ON GRANTING OF WRIT OF MANDATE
HUNTLEY, Justice.On May 2, 1985, Utah Power & Light Company (“UP & L”) filed a Petition for Writ of Mandate, requesting this Court command that Thomas Y. Campbell, Mayor of the City of Idaho Falls, act in accordance with a February 7, 1985 resolution of the Idaho Falls City Council and execute a ground lease and power sales contract with UP & L. The ground lease and power sales contract both relate to a low-head hydroelectric project on the Snake River known as the Gem State Project (“the Project”).
The agreed facts are as follows. On April 7, 1982, UP & L and the City of Idaho Falls entered into a letter of intent wherein the City agreed to construct the hydroelectric project, and to sell a portion of the energy from the Project not required by the City to UP & L. UP & L agreed by that same letter to lease to the City land along the Snake River needed for the Project.
Pursuant to the letter of intent, the City and UP & L negotiated a ground lease and a power sales contract. According to the ground lease, UP & L will lease to Idaho Falls the property needed for the Project through the term of the Federal Energy Regulatory Commission (FERC) license issued to the City for the construction and operation of the Project, and through the term of any renewal or extension of the license. The initial term of the FERC license issued December 12, 1983, is fifty years. In consideration for the use by Idaho Falls of UP & L’s land, the City agreed through the power sales contract to sell the company thirty-nine percent (39%) of the electric energy produced annually by the Project, a percentage which the City *952may reduce at its option if and when it determines that it is in the City’s interest to retain a greater portion of the Project’s output. In any case not less than twenty-five percent (25%) of the Project’s annual output will be sold to UP & L for the term of the power sales contract, which expires thirty-five years from the date commercial operation of the Project begins.
For the energy it receives, UP & L is bound by the power sales agreement to pay an amount equal to the percentage of the output it takes times the sum of the capital (fixed) costs, the variable costs, and 5% of the sum of the capital and variable costs.
On July 19, 1984 the Idaho Falls City Council adopted ordinance No. 1763, in which it found that it was necessary, desirable and essential to the well-being of the City’s inhabitants to undertake acquisition and construction of the Project. The ordinance further recites that because the City did not have sufficient funds to pay the cost of acquisition and construction of the Project, the Project would be financed through the issuance of general obligation bonds pursuant to Chapter 10 of Title 50 of the Idaho Code. The ordinance further provides the City, pursuant to I.C. § 50-1026A, would pledge as an additional source of payment of the bonds, all or any part of the revenues derived or to be derived from rates, fees, tolls or charges imposed for the services, facilities or commodities furnished by the City’s power system which was to be improved and extended by the Project.
On September 11, 1984 the City conducted a special bond election for the purpose of submitting the proposition set forth by the ordinance to the electors of the City, which bond issue carried by a majority of the more than two-thirds of those voting in the election.
In November 1984, CH2M Hill, an engineering consulting firm, submitted a study to the city council. The study concluded that the Project was economically feasible for both the City and the region; that the cost of electrical energy to be produced by the Project would be less than the cost of comparable quality electrical energy from other sources likely to be available to the City in the foreseeable future; that the portion of electrical energy proposed to be sold to UP & L would not be required by the City for distribution in its system before the year 2024; and that the long term value to the City of the Project would be greater than that of any other potential electrical energy resource. On that basis, the study concluded, it was desirable and in the public interest for the City to proceed with the acquisition and construction of the Project and to enter into the ground lease and power sales contract with UP & L.
The city council on February 7, 1985, adopted a resolution which authorized and directed the mayor of Idaho Falls, Thomas V. Campbell, to enter into and execute the ground lease and power sales contract. On February 11, 1985, Mayor Campbell wrote a letter to UP & L in which he declined to execute either the ground lease or the power sales contract. He stated that given the proposed issuance of general obligation bonds by the City to pay the cost of acquisition and construction of the Project, the agreements providing for sale of electrical energy to UP & L for a period in excess of the proposed term of the bonds under the conditions contained in the ground lease and power sales contract may constitute an unlawful lending of credit of the City in violation of Art. VIII, Sec. 4 and Art. XII, Sec. 4 of the Idaho State Constitution. Specifically, Mayor Campbell was concerned with the language in Idaho Falls Consolidated Hospitals v. Bingham County Board of Commissioners, 102 Idaho 838, 839, 642 P.2d 553, 554 (1982), in which this Court stated, “Art. VIII, Sec. 4 specifically forbids counties [and also cities] from loaning or giving credit ‘for any purpose whatever.’ Therefore, the fact that the [Medical Indigency] Act in this case serves a public purpose is not enough in itself to uphold its constitutionality.” Despite the City Council’s finding that the Project would serve a public purpose, Mayor Campbell believed that the ground lease and power sales contract pro*953viding for sale of energy to UP & L for a period in excess of the proposed term of the bonds under conditions contained in the ground lease and power sales contract might represent an extension of credit by Idaho Palls in aid of a private corporation in violation of the Idaho Constitution.
UP & L thereupon filed a petition for writ of mandate, requesting this Court to compel Mayor Campbell to execute the ground lease and power sales contract in conformance with the February 7,1985 resolution by the City Council. The Court entered an alternative writ of mandate commanding Mayor Campbell to either execute the power sales contract and ground lease with UP & L or show cause by answering the petition why he should not be permanently commanded to comply with the proposed writ. The Mayor filed an answer and both parties requested that the hearing on the writ of mandate be expedited because the City’s FERC license requires that construction of the Project commence prior to November 30th, 1985.
Mandamus will lie if the officer against whom the writ is brought has a “clear legal duty” to perform the desired act, and if the act sought to be compelled is ministerial or executive in nature. Fitzpatrick v. Welch, 96 Idaho 280, 527 P.2d 313 (1974); Allen v. Smylie, 42 Idaho 846, 452 P.2d 343 (1969); I.C. § 7-302. Under I.C. § 50-607, a mayor of a city “shall sign all contracts and conveyances in the name of and on behalf of the City.” The mayor of the City of Idaho Falls therefore has a “clear legal duty” to perform the ministerial function of signing all contracts on behalf of the city. Only illegality of the proposed contract would justify his refusal to execute the ground lease and the power sales agreement after authorization and direction by the City Council to execute them.
In Idaho Falls Consolidated Hospitals, Inc., supra, we restated a long-standing construction of the provisions of Art. VIII, Sec. 4 of the Idaho Constitution: namely, that this section imposes an absolute prohibition on any donation or loan of credit by a municipality to a private enterprise.1
This Court has commented:
The proceedings and debates of the Idaho Constitutional Convention indicate a consistent theme running through the consideration of the constitutional sections in question. It was feared that private interests would gain advantages at the expense of the taxpayers. This fear appeared to relate particularly to railroads and a few other large businesses who had succeeded in gaining the ability to impose taxes, at least indirectly, upon municipal residents in western states at the time of the drafting of our constitution.
Boise Redevelopment Agency v. Yick Kong Corp., 94 Idaho 876, 883-84, 499 P.2d 575, 583 (1972).
In Consolidated Hospitals, supra, we stated, “[I]t is apparent that the framers of the Idaho Constitution were primarily concerned about private interests gaining advantage at the expense of the taxpayer.” 102 Idaho at 841, 642 P.2d at 556.
The primary concern of the delegates to the Idaho Constitutional Convention of 1889 in enacting Art. VIII, Sec. 4 and Art. *954XII, Sec., 4 was with loans or donations of public credit. One delegate to the convention contrasted two potential arrangements:
It is supposed that we may desire in our town to have water works — in fact, it is a necessity, and let us suppose it will cost $50,000. If a capitalist comes in and says ‘I will put $25,000 into the enterprise’ and the people of our town will put $25,000 into the enterprise, it seems to me practicable and desirable that the people should be permitted to make the investment of $25,000 in that enterprise. On the other hand we do want to prohibit authority to vote $25,000 to this capitalist and absolutely giving him the money. We want to invest $25,000 in that enterprise and desire to have the income from it. If we furnish water to the town and furnish the money with which to supply the water then let us have our proportion of the money that comes in. And the same rule applies to illuminating the town or anything of this character.
Proceedings and Debates of the Constitutional Convention of Idaho of 1889, vol. I, P. 635 (I.E. Hart, ed., 1912)(Comments of delegate Willis Sweet).
It is obvious that the framers of the Idaho Constitution had no intention of limiting the power of municipalities to contract in furtherance of the public interest, but rather of limiting loans or donations of public credit. These words clearly limit the scope of the credit clause to cases in which the public credit is under the control of private interests.
The transaction between Idaho Falls and UP & L as set forth in the ground lease and power sales contract is neither a loan nor a donation of public credit. It is, rather, an arms-length contract, based on the exchange of adequate consideration. UP & L agrees to lease a parcel of land needed by the City to construct the Project in consideration of the power sales contract. By that contract the City agrees to sell to UP & L up to 39% of the annual energy output of the Project during the term of the contract. The City may reduce that percentage if and when it determines that it is in the City’s interest to retain more of the Project’s output. Further, not less than 25% of the Project’s annual output will be purchased by UP & L, a valuable provision to Idaho Falls because it guarantees a market for at least 25% of the Project’s capacity. The sale of power to UP & L insures a source of revenue to assist in paying the bonds used to finance the Project as well as a percentage of the variable costs.
Mayor Campbell also contends that the ground lease and power sales contract do not serve a public purpose. He cites Village of Moyie Springs, Idaho v. Aurora Manufacturing Co., 82 Idaho 337, 353 P.2d 767 (1960), in which this Court held unconstitutional a statute which authorized cities to issue revenue bonds to finance the acquisition of land and construction of facilities that were to be leased to private enterprises. The Court found that the statute and an ordinance enacted under it by the village violated the provisions of Art. VIII, Sec. 4 and Art. XII, Sec. 4, because the primary purpose of these laws was to benefit private enterprise. The Court stated:
It is obvious that one of the prime purposes of having the necessary bonds issued by and in the name of a municipality is to make them more readily salable on the market. Thus, the credit of the municipality is extended in aid of the project, regardless of the limitations placed upon the remedy of the purchaser.
It seems clear to us that the revenue bonds are issued by the City in its own name to give them a marketability and value which they would otherwise not possess____ the loan of its name by a City to bring about a benefit to a private project, even though general liability does not exist, is nothing short of a loan of its credit. (Citing State ex rel Beck v. City of York, [164 Neb. 223] 82 N.W.2d 269 (Neb.1957).
... [W]e do not agree that an incidental or indirect benefit to the public can trans*955form a private industrial enterprise into a public one, or imbue it with a public purpose. Id. at 345-346, 353 P.2d at 772-773.
To the extent that Moyie Springs has not been overruled by subsequent constitutional amendment2 it still stands for the proposition that a violation of the lending of credit provisions of the Idaho Constitution will occur where the putative public purpose to be served by a pledge of municipal credit is but secondary or incidental to a private purpose.
In contrast to Moyie Springs is Hansen v. Kootenai County Bd. of County Commissioners, 93 Idaho 655, 471 P.2d 42 (1970), in which it was contended that the leasing of a portion of the county fairgrounds to a race track corporation, along with expenditures made by the county for insurance premiums, extension of a water line and road work, constituted a violation of Art. VIII, Sec. 4, and Art. XII, Sec. 4. This Court held that neither provision was violated and distinguished Moyie Springs as follows:
It is our opinion that Village of Moyie Springs, Idaho v. Aurora Manufacturing Co., supra, is distinguishable from the case at bar. The distinction lies in the fact that in that case the city financed with its own funds the acquisition of land which was admittedly not to be used by the village for public purposes, but rather was at the outset intended to be leased to private business. In the present case, on the other hand, the fairgrounds are utilized by the county for the public purpose of conducting the county fair and a portion thereof is leased to a private concern only when not needed for public purposes. It is readily apparent that the Village of Moyie Springs had no use for the land and industrial site it acquired other than to lease it to the Aurora Manufacturing Company, whereas in the present case Kootenai County does have a public use for the fairgrounds and leases them only when not needed for the public purposes. Id. at 660-661, 471 P.2d at 47-48.
Further this Court stated that “[t]here is no purpose in requiring property not needed for public use to lie idle when it could be leased, thus relieving the taxpayers of the cost of maintenance and upkeep on the property.” Id. at 662, 471 P.2d at 49.
The circumstances of Hansen, supra, are more relevant to the instant case. Idaho Falls is acquiring a leasehold and constructing this hydroelectric project for the purpose of supplementing its power supply system. Energy shortages have been forecast for the Pacific Northwest, and Idaho Falls has the obligation to continue to provide electrical energy to its citizens and residents. The City’s contract with the Bonneville Power Administration (BPA) obligates BPA to meet the City’s future load growths only to the extent BPA can acquire the resources necessary to do so. Therefore, the City must undertake a project of its own to ensure it can supply its present and future needs.
The CH2M Hill engineering report indicated that while the City will eventually need the entire load produced by the Project, the portion of the energy to be sold to UP & L for the term of the power sales contract will not be required during that term. That sales contract, then, does not conflict with the public’s use of the property. And though UP & L accrues certain benefits by having available to it some percentage of the supply of the Project, the accrual of incidental benefits to a private enterprise will not invalidate an otherwise constitutional transaction. Boise Redevelopment Agency v. Yick Kong Corp., supra; Idaho Water Resources Board v. Kramer, 97 Idaho 535, 548 P.2d 35 (1976). The record here contains unrefuted evidence that UP & L will be paying adequate consideration for the energy and capacity it is to receive.
We therefore hold that the ground lease and the power sales contract here do not violate Art. VIII, Sec. 4 or Art. XII, Sec. 4 *956of the Idaho Constitution. The Writ of Mandate is hereby granted, and the respondent Mayor Campbell is hereby ordered and commanded to execute the contracts on behalf of the City of Idaho Falls.
DONALDSON, C.J., and SHEPARD and BAKES, JJ., concur.. Idaho Const. Art. 8, Sec. 4. County, etc., not to loan or give its credit. — No county, city, town, township, board of education, or school district, or other subdivision, shall lend, or pledge the credit or faith thereof directly or indirectly, in any manner, to, or in aid of any individual, association or corporation, for any amount or for any purpose whatever, or become responsible for any debt, contract or liability of any individual, association or corporation in or out of this state.
Idaho Const. Art. 12, Sec. 4. Municipal corporations not to loan credit. — No county, town, city, or other municipal corporation, by vote of its citizens or otherwise, shall ever become a stockholder in any joint stock company, corporation or association whatever, or raise money for, or make donation or loan its credit to, or in aid of, any such company or association: provided, that cities and towns may contract indebtedness for school, water, sanitary and illuminating purposes: provided, that any city or town contracting such indebtedness shall own its just proportion of the property thus created and receive from any income arising therefrom, its proportion to the whole amount so invested.
. Idaho Const. Art. VIII, Sec. 5.