The dispositive issue in this appeal is whether a city may dismiss a municipal officer who was appointed for a fixed term of office, before the expiration of that term, solely on the basis of severe deterioration in the city’s financial condition. The plaintiff, William Hennessey, instituted this action against the city of Bridgeport and its former mayor, Thomas W. Bucci (mayor), seeking, inter alia, a writ of mandamus ordering the defendants to restore him to the position of administrator for humane affairs.1 Following a hearing, the trial court denied the plaintiff’s mandamus request. The plaintiff appealed to the Appellate Court, and we transferred the case to ourselves pursuant to Practice Book § 4023. We find no error.
The trial court found the following facts, which are undisputed. In accordance with § 51.5 of the Bridgeport charter,2 the plaintiff was appointed administrator for humane affairs on January 8, 1986, for a four year term of office. On February 19,1988, well before the expiration of the plaintiff’s term of office, the mayor verbally notified the plaintiff of his dismissal due to the *658city’s financial crisis. The mayor also dismissed twenty-eight other city employees at the same time. No hearings were held either before or after any of the layoffs, and the defendants acknowledge that there were no performance or disciplinary reasons for the dismissals. The city was in severe financial distress at the time of the dismissals, and this condition was the sole reason for the city’s action.3 Indeed, Bridgeport’s financial condition was so troubled that the General Assembly enacted special legislation establishing a financial review board to oversee the city’s operation and authorizing a special bond issue to finance the city’s deficit. Spec. Acts 1988, No. 88-80.
*657“The mayor shall appoint an administrator for humane affairs for a term of four years, beginning January 1, 1962. The administrator of humane affairs shall also be the director of public health and registrar of vital statistics for the city of Bridgeport.”
*658Nine months after his dismissal, the plaintiff instituted this action seeking both damages and a writ of mandamus for reinstatement to his former position. In the trial on the mandamus action, the trial court ruled against the plaintiff for two reasons. First, the court concluded that the mayor’s implied authority to dismiss city personnel for financial reasons superseded the plaintiff’s right to serve his full four year term as administrator for humane affairs. Second, the trial court found that the plaintiff’s nine month delay in pursuing his claim for mandamus was sufficiently unexplained, inequitable, and prejudicial to sustain the defense of laches. Although the plaintiff’s appeal challenges both of these trial court rulings, we do not address the applicability of the doctrine of laches to this case because we conclude that the plaintiff has failed to establish his entitlement to a writ of mandamus.
Mandamus, a cause of action with deep roots in the American legal tradition, is the proper remedy for reinstatement of a public officer who, despite a clear legal *659right to remain in office, has been wrongfully ousted from that position. State ex rel. Comstock v. Hempstead, 83 Conn. 554, 556, 78 A. 442 (1910); Thompson v. Troup, 74 Conn. 121, 124, 49 A. 907 (1901); see also Marbury v. Madison, 5 U.S. (1 Cranch) 137, 168-73 (1803). It bears emphasis, however, that “[t]he writ of mandamus is an extraordinary remedy to be applied only under exceptional conditions, and is not to be extended beyond its well-established limits.” Lahiff v. St. Joseph’s Total Abstinence Society, 76 Conn. 648, 651, 57 A. 692 (1904); McAllister v. Nichols, 193 Conn. 168,171, 474 A.2d 792 (1984). Furthermore, “[mjandamus neither gives nor defines rights which one does not already have. It enforces, it commands, performance of a duty. It acts at the instance of one having a complete and immediate legal right; it cannot and it does not act upon a doubtful or a contested right . . . State ex rel. Comstock v. Hempstead, supra, 561; McAllister v. Nichols, supra, 171-72.
A party seeking a writ of mandamus must establish: “(1) that the plaintiff has a clear legal right to the performance of a duty by the defendant; (2) that the defendant has no discretion with respect to performance of that duty; and (3) that the plaintiff has no adequate remedy at law.” Vartuli v. Sotire, 192 Conn. 353, 365, 472 A.2d 336 (1984); Harlow v. Planning & Zoning Commission, 194 Conn. 187, 196, 479 A.2d 808 (1984). Even satisfaction of this demanding test does not, however, automatically compel issuance of the requested writ of mandamus. Hackett v. New Britain, 2 Conn. App. 225, 229, 477 A.2d 148, cert. denied, 194 Conn. 805, 482 A.2d 710 (1984). In deciding the propriety of a writ of mandamus, the trial court exercises discretion rooted in the principles of equity. Sullivan v. Morgan, 155 Conn. 630, 635, 236 A.2d 906 (1967). In the exercise of that discretion, special caution is war*660ranted “where the use of public funds is involved and a burden may be unlawfully placed on the taxpayers . . . Id.
In this case, the plaintiff principally challenges the trial court’s conclusion that because the defendants’ duty to the plaintiff included some element of discretion4 the second part of the mandamus test has not been met. The plaintiff maintains that the defendants had a nondiscretionary duty to appoint an administrator for humane affairs for a four year term, and lacked any power to remove him from office before the expiration of that term, unless they could demonstrate, after giving the plaintiff notice and a hearing, that there was just cause for his removal. The trial court’s error, according to the plaintiff, lies in its misconstruction of § 24 (a) of the Bridgeport charter5 6as affording the mayor the authority to order layoffs for fiscal reasons. That section, the plaintiff contends, merely permits the *661mayor to make recommendations, presumably to the city council, concerning measures to improve the city’s financial condition, but does not allow the mayor unilaterally to implement policies to that end. Like the trial court, we acknowledge that the plaintiff’s appointment for a four year term would ordinarily entitle him to serve the entire term unless removed for cause, but hold that the mayor’s responsibility to manage the city’s finances affords him the implied power to dismiss city personnel for serious fiscal reasons.
As the plaintiff correctly notes, a “city can do no act . . . unless it is authorized to do so by its charter.” Lacava v. Carfi, 140 Conn. 517, 520, 101 A.2d 795 (1953); Perretta v. New Britain, 185 Conn. 88, 92, 440 A.2d 823 (1981); State ex rel. Southey v. Lashar, 71 Conn. 540, 545-46, 42 A. 636 (1899). The city’s powers are thus limited to those that the charter expressly grants and to those that, by implication, are necessary to the exercise of the powers expressly granted. See Simons v. Canty, 195 Conn. 524, 530, 488 A.2d 1267 (1985); Perretta v. New Britain, supra, 101. Section 51.5 of the Bridgeport charter provides that “[t]he mayor shall appoint an administrator for humane affairs for a term of four years,” and § 31 provides that “[a]ll officers of the town and city shall hold their respective offices during the terms for which they shall be chosen . . . except in case of their prior death, resignation, or removal from office.” The charter thus imposes upon the mayor the duty of making an appointment for the position of administrator for humane affairs. Furthermore, since the appointment is for a fixed term of office, the person appointed to that position ordinarily has the right to serve the full four year term unless removed for cause. State ex rel. Raslavsky v. Bonvouloir, 167 Conn. 357, 362, 355 A.2d 275 (1974).
At the same time, the mayor has the duty to promote the financial well being of the city. Section 24 (a) of *662the charter designates the mayor as the chief executive officer of the city, and provides that “[i]t shall also be the duty of the mayor to recommend the adoption of . . . measures connected with ... its government and finances . . . While the plaintiff is correct that § 24 (a) expressly authorizes the mayor only to make recommendations, that provision does make it clear that the mayor is charged with oversight responsibility for the city’s finances. See Lombardi v. Bridgeport, 194 Conn. 601, 611-12, 483 A.2d 1092 (1984).
We have previously held that the power to lay off municipal employees when a city’s financial condition so warrants is necessarily implied from the city’s authority over its finances. Id., 605-606, 610-11; Perretta v. New Britain, supra, 102-103. As we stated in Perretta, “ [wjhen the city determines that its welfare and the proper management of its financial resources require reduced expenditures, it has discretion to husband those resources by laying off city employees whose performance it judges expendable.” Perretta v. New Britain, supra, 102; see also 4 E. McQuillin, Municipal Corporations (3d Ed. 1979) § 12.246.
The dispositive question before us, therefore, is whether this case is distinguishable from Lombardi and Perretta. The plaintiff proffers two reasons why these precedents are not controlling. First, he contends that different rules apply to ordinary city employees than to a municipal officer who has a charter created position for a fixed term of office. Second, he argues that the Bridgeport city charter, in contradistinction to the charters at issue in Lombardi and Perretta, limits the mayor’s authority to lay off city employees. We find neither of these distinctions persuasive.
The plaintiff’s position as a municipal officer is not dispositive with regard to his dismissal at the mayor’s *663discretion in extraordinary financial circumstances. Although his term of office removed the plaintiff from the status of an at-will employee, the plaintiffs in Lombardi and Perretta had similar job security, because they were nonprobationary employees protected by the civil service provisions in the charters of Bridgeport and New Britain, respectively. Lombardi v. Bridgeport, supra, 605; Perretta v. New Britain, supra, 89-90. The plaintiff’s fixed term of office is not of overriding significance since that term was subject to termination for just cause. A similar qualification to job security limited the tenure of the civil service employees in Lombardi v. Bridgeport, supra, and Perretta v. New Britain, supra, 93-94. The plaintiff has pointed to no other practical consequences attendant to his position as a municipal officer that should, as a matter of policy, insulate him from the fiscal realities of the city in which he works.
The Bridgeport charter does not support the plaintiff’s alternate argument, that the mayor lacks the authority to terminate his position. In Perretta, we held that a city has the implied power to lay off city employees only in the absence of a charter provision limiting that power. Id., 103. Both Lombardi and Perretta recognized the fundamental difference in charter provisions between those that regulate a dismissal for performance related reasons and those that limit layoffs for fiscal reasons. Lombardi v. Bridgeport, supra, 610-11; Perretta v. New Britain, supra, 102. While dismissals for performance must comply with the procedural requirements of notice and hearing and the substantive requirement of just cause, fiscally motivated layoffs are exempt from those rules unless some charter provision expressly imposes such constraints on fiscal layoffs. Section 51.5 of the Bridgeport charter, which establishes the four year term of office, is entirely silent on the subject of layoffs for fiscal rea*664sons. As we stated in Perretta, where the charter says nothing about layoffs for fiscal reasons, “a city’s mayor, as its chief executive officer, has the authority to order layoffs of city employees for the purpose of implementing a properly promulgated municipal budget that mandates fiscal stringency.” Perretta v. New Britain, supra, 103.
Since the mayor has the discretion to remove the plaintiff under circumstances of financial stringency, we conclude, as did the trial court, that the second part of the mandamus test, that the defendants have ho discretion in the matter, is not satisfied.6 We therefore conclude that the plaintiff has failed to prove that he is entitled to a writ of mandamus.
• There is no error.
In this opinion the other justices concurred.
The complaint also stated five additional counts alleging several other causes of action and seeking various forms of relief. This appeal concerns only the plaintiffs request for a writ of mandamus in count one of the complaint, which the trial court considered in advance of the remaining allegations.
Section 51.5 of the charter of Bridgeport provides in pertinent part: “administrator.
Although the plaintiffs brief states that the purported justification for his dismissal was pretextual, he conceded at oral argument that he is not, for purposes of this mandamus action, disputing that the city’s financial crisis was the sole reason for his dismissal.
The plaintiff characterizes the trial court’s decision as declaring that the first two parts of the mandamus test were met but then deviating from the three part test to justify its refusal to grant the writ. The memorandum of decision, in which the trial court quotes Lombardi v. Bridgeport, 194 Conn. 601, 611-12, 485 A.2d 1092 (1984), reveals, however, that the court found only the first part of the test satisfied, and concluded, after a rather lengthy analysis of several factors relevant to the second part, that “ ‘ “[wjhen the city determines that its welfare and the proper management of its financial resources require reduced expenditures, it has discretion to husband those resources by laying off city employees whose performance it judges expendable.” ’ ” (Emphasis added.) It is thus clear that the trial court found that mandamus was not appropriate because the plaintiff could not demonstrate that the defendants had no discretion in the matter.
Section 24 (a) of the charter of Bridgeport provides in pertinent part: “powers and duties of the mayor.
“(a) The mayor of the city shall be the chief executive officer thereof, and it shall be his duty to be vigilant and active in causing the laws to be executed and enforced within the city .... It shall also be the duty of the mayor to recommend the adoption of all such measures connected with the policing, security, health, cleanliness, and ornament of the city, and the improvements of its government and finances as he shall deem expedient . . . .”
The plaintiff also argues that a writ of mandamus should issue even if the charter affords the defendants the authority to lay off municipal officers for fiscal reasons on the ground that the mayor abused his executive discretion in choosing to dismiss the plaintiff. The plaintiff emphasizes the fact that there were “hundreds of low-level, non-charter employees” within the department of humane affairs who were, as he puts it, “more expendable.” It is ironic to have this argument propounded by the administrator for humane affairs; it is, in any case, totally without merit. Fundamentally, the plaintiff’s reference to “executive discretion” precludes resort to mandamus, since that remedy is available only when the defendant’s duty is nondiscretionary. Vartuli v. Sotire, 192 Conn. 353, 365, 472 A.2d 336 (1984).