
423 N.W.2d 155 (1988)
David FELDHUSEN, Plaintiff and Appellant,
v.
BEACH PUBLIC SCHOOL DISTRICT NO. 3, a public corporation, Defendant and Appellee.
Civ. No. 870354.
Supreme Court of North Dakota.
May 16, 1988.
*156 Daniel J. Chapman, of Chapman & Chapman, Bismarck, for plaintiff and appellant.
Gary R. Thune, of Pearce & Durick, Bismarck, for defendant and appellee.
VANDE WALLE, Justice.
David Feldhusen appealed from a judgment dismissing his petition for a writ of mandamus. We affirm.
Feldhusen was employed by Beach Public School District No. 3 (Beach) as a teacher in the fall of 1981. His employment continued until his contract was nonrenewed in the spring of 1987.
Beach takes part in a voluntary "accreditation" program established by the State Department of Public Instruction. In order to be accredited a school district must establish and implement a policy for the professional growth of teachers. Beach implemented its policy through the following provision in its professional-negotiations agreement with the teachers in the school district:
"Summer school & extension course attendance shall be as follows to advance on the salary schedule:
"a. All plus hours must be graduate hours.
"b. Teachers with degrees must acquire 8 semester or 12 quarter hours every five years.

"c. Teachers may substitute 16 hours of certified in-service training for 1 quarter hour. See attached policy on in-service hours.
"d. All credits must be earned from an accredited college or university.
"e. All teachers must provide written proof each year by the second Monday in September that they meet above accreditation standards as required by North Dakota Department of Public Instruction. No salary increase will be granted the year accreditation standards are not met and no teacher contract will be offered the following year unless accreditation standards are met." [Emphasis added.][1]
*157 This agreement was made by the Beach school board and a representative for the teachers, apparently pursuant to Section 15-38.1-12, N.D.C.C.
Beach established this policy in 1981. The 1985-1986 school year was the fifth year of the cycle for Feldhusen. At the end of that school year Feldhusen had completed only six of the requisite twelve quarter-hours.
In March of 1987 the Beach school board voted to contemplate nonrenewal of Feldhusen's teaching contract. A letter was sent to Feldhusen informing him of the contemplated nonrenewal for the reason of "teacher qualifications" based upon Feldhusen's failure to meet the accreditation standards. Subsequently a hearing was held by the school board to consider the nonrenewal. At the conclusion of the hearing the Beach school board voted to nonrenew Feldhusen's contract.
After the end of the 1986-1987 school year Feldhusen performed coursework which would have given him the number of credits or quarter-hours required by the Beach accreditation policy. This work was completed in June of 1987. In July of 1987 Beach hired another teacher to fill the position which Feldhusen had held. Subsequently Feldhusen petitioned for a writ of mandamus requiring Beach to give him a contract. After a hearing was held, the trial court issued a judgment dismissing the petition. It is from that judgment that Feldhusen appeals.
The question before us is whether the trial court erred in dismissing Feldhusen's petition for a writ of mandamus.[2] This court "will not overturn a trial court's denial of a writ of mandamus unless the trial court has abused its discretion." McCallum v. City Com'rs of City of Bismarck, 393 N.W.2d 263, 264 (N.D.1986); Fargo Ed. Ass'n v. Paulsen, 239 N.W.2d 842 (N.D. 1976). In order that a writ of mandamus be granted,
"the petitioner must show that he has no plain, speedy, and adequate remedy in the ordinary course of the law and that he has a clear legal right to the performance of the particular act sought to be compelled by the writ." Fargo Ed. Ass'n, supra, 239 N.W.2d at 844.
See also Mini Mart, Inc. v. City of Minot, 347 N.W.2d 131 (N.D.1984); Hennebry v. Hoy, 343 N.W.2d 87 (N.D.1983); Sections 32-34-01 and 32-34-02, N.D.C.C.
Feldhusen first argues that he has a clear legal right to a contract from Beach because there was no statutory basis for the Beach school board's nonrenewal decision. We disagree. The nonrenewal of teacher contracts is governed by Section *158 15-47-38(5), N.D.C.C. A portion of that statute provides:
"The reasons given by the board for not renewing a teacher's contract must be sufficient to justify the contemplated action of the board and may not be frivolous or arbitrary but must be related to the ability, competence, or qualifications of the teacher as a teacher, or the necessities of the district such as lack of funds calling for a reduction in the teaching staff."
Thus teachers' contracts can be nonrenewed for a lack of qualifications.
In this case Beach was voluntarily taking part in an accreditation program which required that it assure the professional growth of its teachers. In order to comply with the accreditation standards Beach, in tandem with its teachers, created a policy requiring its teachers to acquire a certain number of college credits in a five-year period. That policy became a part of the professional-negotiations agreement between the Beach school board and the teachers of Beach. It is readily apparent that one of the qualifications for a teacher in Beach was that the teacher abide by the contractual provision designed to retain Beach's accreditation. If a teacher failed to abide by the provision regarding the acquisition of college credits, the negotiated policy specified that no teacher contract would be offered the following year, thus justifying nonrenewal under Section 15-47-38(5). Therefore, we cannot conclude that the trial court abused its discretion in denying the petition for a writ of mandamus which was predicated upon a claim that nonrenewal could not be grounded in a teacher's failure to abide by the Beach policy as formulated in the professional-negotiations agreement.
Secondly, Feldhusen contends that, even if a nonrenewal could be based upon a teacher's failure to abide by Beach's policy, there was no such failure in this case. In making this argument Feldhusen directs us to subsection XI(e) of the Beach professional-negotiations agreement:
"e. All teachers must provide written proof each year by the second Monday in September that they meet above accreditation standards as required by North Dakota Department of Public Instruction. No salary increase will be granted the year accreditation standards are not met and no teacher contract will be offered the following year unless accreditation standards are met." [Emphasis added.]
Feldhusen argues that the emphasized language clearly provides the teacher with a one-year period of grace in which to meet the accreditation standards. In this case that period would have ended on September 2, 1987. Feldhusen notes that by that date he had acquired the college credits necessary to comply with the accreditation standards, and nonrenewal would not have then been justified. Thus Feldhusen argues that he has a clear legal right to a contract.
We think that, even viewing the facts in the light most favorable to Feldhusen, the contractual provision he relies upon for this contention is at best ambiguous. The provision does not indicate that Feldhusen has a clear legal right to a contract; rather, it requires interpretation to determine its meaning. Feldhusen notes:
"The fact that the court will be forced to construe or interpret a statute or examine the facts to which a statute applies does not necessarily preclude the remedy of mandamus." Fargo Ed. Ass'n, supra, 239 N.W.2d at 845.
However, this case does not involve the construction of a statute and it would require much more than an application of facts to a statute. It would require a totally separate interpretation of the meaning and the intent of contractual language in order that the court may determine the legal rights created by the contract. There *159 is no clear legal right to the issuance of a contract under such circumstances; therefore, we cannot conclude that the trial court abused its discretion in dismissing the petition for a writ of mandamus.[3]
The judgment is affirmed.
ERICKSTAD, C.J., and GIERKE, MESCHKE and LEVINE, JJ., concur.
NOTES
[1]  Schools are accredited and teachers are certified. See Section 15-21-04.1 and Chapter 15-36, N.D.C.C. Feldhusen was certified as a teacher. One of the standards required for accreditation of the school, a voluntary process, is that the school board establish and implement a policy of professional growth for each teacher and that it also locally establish the five-year period for each teacher who holds a life certificate. The language of the Beach policy requiring that teachers "meet ... accreditation standards as required by North Dakota Department of Public Instruction" relates to the credits required of each teacher in order that the school meet the standards for accreditation.
[2]  We have previously held that in cases where the continuing contract of a teacher, created by Section 15-47-27, N.D.C.C., is not legally terminated, a writ of mandamus would be available where factual circumstances permit. See, e.g., Henley v. Fingal Public School District No. 54, 219 N.W.2d 106 (N.D.1974), and Baker v. Minot Public School District No. 1, 253 N.W.2d 444 (N.D.1977). In previous cases, depending upon the circumstances, the teacher and the school board have alternated in taking the position that the teacher must seek reinstatement before damages are allowed or, on the contrary, a suit for damages is the only remedy for wrongful nonrenewal. For a summary of those cases see Samuels v. White Shield Public Sch. Dist., 297 N.W.2d 421, 425 (N.D.1980) (VandeWalle, J., concurring specially). In Samuels, we concluded that a teacher who did not seek reinstatement was not precluded from receiving relief by way of damages if the nonrenewal was wrongful. In some instances the teacher has sought reinstatement by way of mandamus or, alternatively, sought damages. E.g., Reed v. Edgeley Public School Dist. No. 3, 313 N.W.2d 775 (N.D. 1981); Dobervich v. Cent. Cass Pub. Sch. Dist. No. 17, 283 N.W.2d 187 (N.D.1979). Here, there was no claim for damages and our opinion is not concerned therewith. We are concerned only with the narrow issue of whether or not under the circumstances of this case the trial court abused its discretion in denying the petition for a writ of mandamus.
[3]  Were this a nonrenewal for the purpose of reducing faculty for reasons of financial difficulty in the school district or for declining enrollment, maximum consideration to basic fairness and decency relating to the teacher's position and career, as specified in Section 15-47-38(5), N.D.C.C., might cause one to conclude that the teacher should be offered a position for any opening that might occur subsequent to nonrenewal. See Fercho v. Montpelier Pub. Sch. Dist. No. 14, 312 N.W.2d 337, 342 (N.D.1981) (VandeWalle, J., concurring specially). Because Feldhusen obtained the necessary credits before his position was filled by Beach, a somewhat comparable argument is made here. Although it seemingly has some merit, there is an obvious distinction: Nonrenewal for reasons of financial difficulty or declining enrollment is unrelated to and beyond the ability of the teacher to correct; nonrenewal for failure of the teacher to acquire the credits agreed to in the negotiated agreement is the responsibility of the teacher. The record does not reflect, and we were not informed of, the reasons the school district did not reemploy Feldhusen after he met the requirements and applied for the position before it was filled.
