
684 P.2d 495 (1984)
The STATE of Montana on the relation of GALLOWAY, INC., a Mont. Corp., et al., Plaintiffs and Appellants,
v.
The CITY OF GREAT FALLS, Montana, et al., Defendants and Respondents.
No. 83-498.
Supreme Court of Montana.
Submitted April 16, 1984.
Decided July 26, 1984.
*496 Graybill, Ostrem, Warner & Crotty, Michael G. Barer argued, Great Falls, for plaintiffs and appellants.
David V. Gliko, City Atty., Great Falls, Cure, Borer & Davis, Maxon R. Davis argued, Great Falls, for defendants and respondents.
WEBER, Justice.
Plaintiff filed a complaint in Cascade County District Court against the City of Great Falls, two of its officers, and the acting City Commission. Plaintiff sought a writ of mandamus compelling Great Falls to issue a building permit for a pre-release center and for a declaratory judgment that the use of the property as a pre-release center was permitted under the Urban Renewal Plan of Great Falls. The District Court denied mandamus and entered a judgment for the defendants on the declaratory judgment count. We affirm the District Court.
The determinative issues are:
1. Whether the use of plaintiff's property as a pre-release center is permitted under the Great Falls Central Place Revitalization Program Urban Renewal Plan (Urban Renewal Plan)?
2. Whether the District Court abused its discretion in refusing to issue a writ of mandamus to compel the City to issue a building permit under which the plaintiff could remodel its building for a pre-release center?
A pre-release rehabilitation center is a residence for inmates of Montana State Prison under the supervision and custody of the Department of Institutions. Operation of a pre-release center by a nonprofit corporation does not change the status of the inmates. A rehabilitation center is a correctional institution.
The facts as determined by the District Court include the following. In the summer of 1982, the Great Falls Pre-release Services Association, Inc., selected plaintiff's building at 313-315 Second Avenue South, Great Falls, as the site for a prospective pre-release center. Plaintiff's building lies within the "B-3" high density business district of Great Falls' Urban Renewal Plan. Plaintiff prepared and submitted remodeling plans to the Great Falls Building Inspector's office on or about September 13, 1982.
Plaintiff's remodeling plans were reviewed by a zoning technician, who did not consider whether the center was a permitted use under the Urban Renewal Plan. After making changes, plaintiff returned with the plans and met with the City Building Inspector. Finding no structural problems with the plans, the inspector approved plaintiff's building permit application on September 15, 1982. Plaintiff did not pay the permit fee. No building permit was issued. Plaintiff merely took the approved application form in order to continue its efforts to obtain the pre-release center.
In November, 1982, plaintiff was advised by several City officials that there was a question as to whether the pre-release center was a permitted use. Plaintiff then requested a zoning variance from the Great Falls City Commission. The Commission held a public meeting on December 7, 1982 and determined that the pre-release center was not a permitted use under the Urban Renewal Plan.
In February, 1983, plaintiff returned the permit application to the City and tendered *497 the building permit fee, which was refused. Plaintiff then commenced this action.
Plaintiff argues that it relied to its detriment on the issuing of a building permit, based upon its approved application. The District Court found that plaintiff had obtained a razing permit and removed certain partitions, but that the removal was not the costly type of demolition which would warrant a finding that the City should be estopped from denying a building permit on a theory of detrimental reliance. The District Court concluded that a pre-release center was not a permitted use in a high density business district under the Urban Renewal Plan, which permits a correction and rehabilitation use only in public land and institutional districts.

I
Was the use of the plaintiff's property as a pre-release center permitted under the Urban Renewal Plan? A review of the record discloses there are substantial facts to support the findings of fact on the part of the District Court on this issue. Plaintiff does not seriously contend to the contrary.
The District Court concluded as a matter of law that a pre-release center was not a permitted use in a B-3 district. Our review of the complex Urban Renewal Plan discloses that a pre-release center is not a permitted use. In fact the determination regarding a pre-release center has become moot.
Both plaintiff and defendants have agreed that only one pre-release center is to be constructed in Great Falls at this time and that such a center now exists in a different building. As a result, a declaratory judgment for the plaintiff would be of no assistance. Plaintiff essentially has abandoned its request for a declaratory judgment and requested a return of the case for trial on damages under a theory of detrimental reliance.
Plaintiff's request is not appropriate under the pleadings in this cause. Initially plaintiff sought damages for malicious, arbitrary and illegal refusal to issue a building permit under Count II of its complaint, but that count was dismissed with prejudice by the District Court. Plaintiff did not object to that dismissal. There is no theory under the pleadings which would allow a remand for trial on the issue of damages.
We affirm the judgment for the defendants on this issue.

II
After making the initial building permit application, plaintiff requested that the City Commission of Great Falls authorize a zoning variance for the pre-release center. After a public hearing, the City Commission refused the variance. That act is not reviewable by writ of mandamus.
Use of a writ of mandate is specifically controlled by statute. Section 27-26-102(1), MCA provides in pertinent part that a writ of mandate "... may be issued by the ... court ... to compel the performance of an act which the law specifically enjoins as a duty resulting from an office, trust, or station ... ."
"The writ will issue only where the person seeking to invoke it is entitled to have the defendant perform a clear legal duty and there is no speedy or adequate remedy in the ordinary course of law." State ex rel. Swart v. Casne (1977), 172 Mont. 302, 309, 564 P.2d 983, 987.
As this Court stated in Erie v. State Highway Commission (1969), 154 Mont. 150, 153-54, 461 P.2d 207, 209:
"This Court has been quite consistent in its holdings concerning the issuance of injunctions and writs of mandate by district courts to control actions of administrative boards and agencies. The rule simply put is that a board may be enjoined from acting outside the scope of its authority and such board may be compelled to perform an act it is legally bound to perform; but neither of these extraordinary remedies will lie to control the discretion of a board unless it has been clearly shown that the board has manifestly abused such discretion."
*498 Mandamus will lie to direct performance of a clear legal duty. Kadillak v. Anaconda Co. (1979), 184 Mont. 127, 144, 602 P.2d 147, 157. The City Commission can be compelled to perform an act it is legally bound to perform, but "[t]here is no power in our courts to control the discretion of a municipal body or officer by mandamus." State ex rel. Diehl Co. v. City of Helena (1979), 181 Mont. 306, 314, 593 P.2d 458, 463.
There is no legal duty requiring the City Commission to approve any variance from the Urban Renewal Plan. That action is purely discretionary. Following a noticed hearing, the City Commission voted to deny plaintiff's application for a zoning variance. Because the procedure followed was proper and the denial of an application for variance is discretionary, the Commission's vote cannot be controlled by mandamus.
We affirm the denial of mandamus by the District Court.
HASWELL, C.J., and HARRISON, SHEA, SHEEHY, GULBRANDSON and MORRISON, JJ., concur.
