
370 So.2d 942 (1979)
McDOWELL-PURCELL, INC.
v.
Ray D. BASS, etc.
77-409.
Supreme Court of Alabama.
March 23, 1979.
Rehearing Denied May 11, 1979.
James E. Clark of London, Yancey, Clark & Allen, Birmingham, for appellant.
*943 Edward H. Brogden, Jack F. Norton, Chief Counsel, State of Alabama Highway Department, Montgomery, for appellee.
EMBRY, Justice.
This is an appeal from a judgment which denied the petition of appellant McDowell-Purcell, Inc. seeking a writ of mandamus to compel Ray D. Bass, Alabama Highway Director, to approve and cause payment to appellant of monies according to McDowell-Purcell's interpretation of the terms of a contract between it and the Alabama Highway Department and contrary to Bass' interpretation. Release was sought of certain payments under the contract retained by the Alabama Highway Department for work done about which there was no dispute.
The dispositive issue in this case is whether McDowell-Purcell has a clear right to the writ of mandamus, under the facts of this case to compel action by Bass and remove this action from one categorized as being against the State of Alabama, therefore prohibited by Section 14 of the Alabama Constitution, because Bass, in the exercise of discretionary authority, abused that discretion.
The contract between McDowell-Purcell, Inc., and the State of Alabama was for the construction of a section of Interstate 65 in Jefferson County. In constructing the highway it was necessary to blast cuts through large rock formations consisting of shale and lime. Under the contract McDowell-Purcell was required to shore up the sides of the cuts to prevent rock slides. Because layers of shale rock tend to be loosened by erosion from exposure to the weather the shale formations are covered with a pneumatic concrete blanket which is pressure sprayed concrete; a process called "Guniting." The concrete is applied to a thickness of three inches on steel mesh which is anchored by long metal rods inserted into the shale and secured in place by grout: a thin course mortar.
Unlike shale, lime rock formations are not in layers that are loosened by erosion from exposure to the weather resulting in rock slides. Lime rock has natural seams which when weakened by the blasting necessary to make the roadway cuts create the hazard that in the future large rocks will fall to the roadbed below the cut. To prevent this, pneumatic concrete blankets are not used. Instead, the large rocks, loosened by weakening of their seams, are anchored to the solid rock by inserting and securing in place the long metal rods in the same manner as is the case with shale. These rods are called rock bolts.
The contract required that rock bolts used to anchor lime rocks be of the same type as those used to anchor the steel mesh to shale rock. The price to be paid for installing these rock bolts is the cause of dispute in this case. The contract provided for the payment of four dollars per linear foot for rock bolting. It provided that twenty-five dollars per square yard be paid for pneumatic concrete blanketing. There is no question that for rock bolting the limestone payment was to be at the rate of four dollars per linear foot.
The dispute is whether rock bolting the steel mesh over shale is included in the twenty-five dollars per square yard rate for concrete blanketing or should four dollars per linear foot be paid for that rock bolting in addition to the twenty-five dollars per square yard.
McDowell-Purcell sought payment from the Highway Department of the sum of four dollars per linear foot for all rock bolting. The Department declined to pay and McDowell-Purcell made claim for payment to the Claims Committee of the Department. After an evidentiary hearing the Committee submitted its report to the Highway Department Director: Bass. The report concluded that the contract, plans, and specifications were sufficient to make it clear the cost of the rock bolts used in laying the pneumatic concrete blanket was to be included in the bid price per square yard for blanketing. Bass, although not bound by the Committee's report, combined the contents of the report with his personal knowledge of the circumstances and denied McDowell-Purcell's claim. It then filed its *944 petition for the writ of mandamus to compel Bass to make payment of it at the rate of four dollars per linear foot for all rock bolting as well as to release retainage in the amount of $150,000. After trial without a jury, judgment was entered under which relief was denied and this appeal ensued.
There are certain principles of law applicable to this case. Among those are the following: Suits against the State are prohibited by Section 14 of the Constitution of Alabama of 1901 and those dealing with the State are charged with knowledge of this. Dunn Construction Co. v. State Board of Adjustment, 234 Ala. 372, 175 So. 383 (1937). This immunity from suit does not extend, in all instances, to officers of the State acting in their official capacity. Unzicker v. State, 346 So.2d 931 (Ala.1977). In limited circumstances the writ of mandamus will lie to require action of state officials. This is true where discretion is exhausted and that which remains to be done is a ministerial act. See Hardin v. Fullilove Excavating Co., Inc. 353 So.2d 779 (Ala. 1977); Tennessee & Coosa R.R. Co. v. Moore, 36 Ala. 371 (1860). Action may be enjoined if illegal, fraudulent, unauthorized, done in bad faith or under a mistaken interpretation of law. Wallace v. Board of Education of Montgomery Co., 280 Ala. 635, 197 So.2d 428 (1967). If judgment or discretion is abused, and exercised in an arbitrary or capricious manner, mandamus will lie to compel a proper exercise thereof. The writ will not lie to direct the manner of exercising discretion and neither will it lie to compel the performance of a duty in a certain manner where the performance of that duty rests upon an ascertainment of facts, or the existence of conditions, to be determined by an officer in his judgment or discretion. See Barnes v. State, 274 Ala. 705, 151 So.2d 619 (1963).
Mandamus is an extraordinary remedy and should be granted only to prevent a failure of justice or irreparable injury. Ex parte Garrison, 260 Ala. 379, 71 So.2d 33 (1954).
McDowell-Purcell contends that because the required rock bolting has been completed and accepted by appellee Bass, all that remains is for Bass to perform a ministerial act: paying McDowell-Purcell for all rock bolting at four dollars per linear foot. Were one other circumstance present we would be compelled to agree. The payment request for the rock bolting by McDowell-Purcell has never been approved by the Highway Department. Had it been, mandamus would lie because all that would remain would be for Bass to make payment. See Dampier v. Pegues, 362 So.2d 224 (Ala. 1978); Hardin v. Fullilove Excavating Co., Inc., 353 So.2d 779 (Ala.1977).
McDowell-Purcell had constructive notice that it could not sue the State over a contract dispute. Section 14, Const.1901. It was furnished the contract, specifications and plans, and was free to consult with officials of the Highway Department concerning any ambiguities it considered present in those documents. If they were not cleared up to McDowell-Purcell's satisfaction it could have refused to submit a bid. In this case Bass had a duty to either approve or disapprove payment according to one of two different interpretations of the contract. Performance of that duty rested upon his judgemental or discretionary ascertainment of facts or existence of conditions to be applied under the terms of the contract. The writ of mandamus will not lie to compel him to exercise his discretion and apply the ascertained facts or existing conditions under the contract so as to approve payment to McDowell-Purcell according to its interpretation of the contract rather than his. See generally, Ex parte Cannon, 369 So.2d 32, (Ala.1979); Barnes v. State, supra; Gardner v. Stevens, 269 Ala. 213, 111 So.2d 904 (1959).
We hold that the writ of mandamus will lie to compel the exercise of official discretion to interpret a contract, but absent abuse of discretion, or arbitrary or capricious exercise of discretion in the interpretation, the writ will not lie to command a given interpretation. State Highway Commission v. Green-Boots Const. Co., 199 *945 Okl. 477, 187 P.2d 209 (1947). In the instant case the trial court held there was no abuse of discretion by Bass in this matter. That finding is presumed correct. Hardin v. Fullilove Excavating Co., Inc., supra, at 783. Review of the record compels us to the same conclusion as that of the trial court regarding abuse of discretion.
McDowell-Purcell additionally contends it is entitled to $150,000 in earned retainage withheld by Bass. This amount was withheld by the Highway Department because McDowell-Purcell refused to sign the "final estimate" prepared by the Highway Department of the amount of various classes of work performed by the contractor. Monies to pay for this work are retained until the final estimate is approved by the contractor. At trial, the evidence showed McDowell-Purcell refused to sign the final estimate because of its rock bolting claim. Bass in turn refused to pay McDowell-Purcell until it signed the final estimate. We hold the trial court was correct in denying McDowell-Purcell's claim.
Because of our holding that Bass did not abuse his discretion in interpreting the contract, McDowell-Purcell is now free to sign the final estimate and receive the retainage.
The trial court's findings of fact and conclusions of law being correct, its judgment is affirmed.
AFFIRMED.
BLOODWORTH, FAULKNER, ALMON and SHORES, JJ., concur.
