
84 Ill.2d 436 (1981)
420 N.E.2d 147
NORMA RELPH, Appellee,
v.
THE BOARD OF EDUCATION OF DePUE UNIT SCHOOL DISTRICT NO. 103, Appellant.  ROBERT B. HAGOPIAN et al., Appellees,
v.
THE BOARD OF TAMPICO COMMUNITY UNIT SCHOOL DISTRICT NO. 4, Appellant.
Nos. 53655, 53657 cons.
Supreme Court of Illinois.
Opinion filed March 31, 1981.
*437 *438 Drach, Terrell & Deffenbaugh, P.C., of Springfield, for appellants.
Robbins, Schwartz, Nicholas, Lifton & Taylor, Ltd. (Allen D. Schwartz and S. Bennet Rodrick, of counsel), for appellees.
Judgments reversed; causes remanded.
MR. JUSTICE RYAN delivered the opinion of the court:
The original petitioners in these consolidated cases, Norma Relph, Robert B. Hagopian, and Mary E. Foley, were tenured teachers who were dismissed because of the economic conditions of their respective school districts. Section 24-12 of the School Code (Ill. Rev. Stat. 1977, ch. 122, par. 24-12) provides that in such cases the board of education shall first remove nontenured teachers before removing a teacher who has attained tenured status and "who is legally qualified to hold a position currently held by a teacher who has not entered upon contractual continued services." The petitioners filed mandamus actions in their respective circuit courts, seeking to compel reinstatement by their boards of education, contending that *439 they were legally qualified to hold positions then being held by nontenured teachers. The circuit courts entered summary judgments in favor of the respondents and the teachers appealed. In the first appeals in these cases, the appellate court affirmed the judgment in favor of the school board as to Hagopian (who is no longer in this case) but reversed and remanded to the circuit court as to Mary Foley in Hagopian v. Board of Education (1978), 56 Ill. App.3d 940. The court reversed and remanded as to Norma Relph in Relph v. Board of Education (1977), 51 Ill. App.3d 1036.
Because both Mary Foley and Norma Relph possessed the appropriate teacher's certificate the appellate court held that they were legally qualified. In Relph, the appellate court held that compliance with a regulation entitled "Circular Series A, Number 160" (now the State Board of Education Document No. 1) issued by the Illinois Office of Education was not required when determining whether a teacher is "legally qualified" within the meaning of section 24-12 of the School Code. (51 Ill. App.3d 1036, 1041.) The regulation sets out additional educational requirements for teaching particular subjects beyond the appropriate teacher's certificate as required by sections 21-1 and 21-5 of the School Code (Ill. Rev. Stat. 1977, ch. 122, pars. 21-1, 21-5). In both Relph and Hagopian, the cases were remanded to the trial courts with directions. Subsequent to remand, this court decided Lenard v. Board of Education (1979), 74 Ill.2d 260. In Lenard, this court held that the provisions of Circular Series A, No. 160, were incorporated by reference into the term "legally qualified" in section 24-12 of the School Code. 74 Ill.2d 260, 268-69.
Norma Relph's case had been remanded to the circuit court of Bureau County with directions to enter judgment in favor of the petitioner consistent with the views expressed in the opinion. (51 Ill. App.3d 1036, 1042.) On *440 remand, Norma Relph, who had obtained employment elsewhere since her dismissal, sought damages for respondent's failure to reinstate her. The board of education, relying upon our holding in Lenard, filed a motion asking the trial court to redetermine Norma Relph's qualifications in light of Lenard. The trial court felt bound by the previous holding in the appellate court and entered judgment for damages in favor of Norma Relph and ordered that she be reinstated. The board of education appealed.
In Hagopian v. Board of Education, Mary Foley's case had been remanded to the circuit court of Whiteside County with directions that the writ of mandamus should issue and that she should be reinstated as a tenured teacher. (56 Ill. App.3d 940, 949.) The board of education had reinstated Mary Foley as a teacher after the appellate court's decision was announced, and it appears that the trial court, on remand, did not issue a writ of mandamus. Mary Foley, as the sole remaining petitioner in that case, sought damages in the circuit court. However, since the mandate of the appellate court did not mention the award of damages, the trial court felt it had no authority to award them and denied Mary Foley's prayer. In this case Mary Foley, the teacher, appealed.
In each case, on the second appeal to the appellate court, the board of education insisted that our opinion in Lenard should control and that the appellate court should reverse its previous holdings. The appellate court, however, held in each case, with one justice dissenting, that its prior opinions were res judicata between the parties on the issue of the teachers' qualifications and could not be reexamined despite the Lenard decision. (Hagopian v. Board of Education (1980), 83 Ill. App.3d 1097; Relph v. Board of Education (1980), 83 Ill. App.3d 1139.) We granted leave to appeal pursuant to Rule 315(a) (73 Ill.2d R. 315(a)) and consolidated the cases in this court.
*441 The appellate court, in each case, based its holding that the prior decisions in those cases were res judicata upon the premise that those appeals had resulted in a final and conclusive order on the issue of petitioners' qualifications. There is no doubt that the parties had had a full and fair opportunity to litigate the issue of whether petitioners were "legally qualified" prior to this court's decision in Lenard. That fact, however, does not satisfy the finality requirement of the doctrine of res judicata.
The judgment of a court of competent jurisdiction, although it may be erroneous, is binding upon the parties until reversed and cannot be collaterally attacked. (People ex rel. First National Bank v. Russel (1918), 283 Ill. 520, 523.) However, before the judgment can stand as a bar to subsequent actions under the doctrine of res judicata, the first action must result in a final judgment on the merits. (People ex rel. Scott v. Chicago Park District (1976), 66 Ill.2d 65, 69; People v. Kidd (1947), 398 Ill. 405, 408-09.) A judgment is final if it determines the litigation on the merits so that if affirmed the only thing remaining is to proceed with the execution on the judgment. Village of Niles v. Szczesny (1958), 13 Ill.2d 45, 48.
The opinions of the appellate court acknowledge that on remand it was incumbent upon the trial courts to have further proceedings. In fact, the mandates directed further proceedings. However, it is now argued in this court that the remands were with specific directions and were not general in nature. Therefore, it is contended, the adjudication by the appellate court was final. We do not agree. On remand it was incumbent upon the trial courts to enter judgments. Although the courts may have been limited to the entry of judgments that conformed to the mandates of the appellate court, the judgments were nonetheless appealable. Section 6, article VI, of our constitution provides: "Appeals from final judgments of a circuit court *442 are a matter of right * * *." (Ill. Const. 1970, art. VI, sec. 6.) The need for an appeal, even though a judgment can be entered only in conformance with the mandate, is apparent from Mary Foley's case, where the trial court refused to award damages because it felt it had no authority to do so under the mandate. The appellate court, on appeal from this denial, held that it was within the scope of its original mandate to award damages. (Hagopian v. Board of Education (1980), 83 Ill. App.3d 1097, 1101-02.) The issues in both cases therefore had not been finally adjudicated when the mandates of the appellate court issued. The cases, even after the entry of the judgments in the trial court, were still subject to the appellate process.
Even if the appellate court were bound by the law of the case it had announced in the first appeals, that limitation would not apply to this court. Although this court denied petitions for leave to appeal in both of the previous appeals of these cases, such action has no precedential effect and in no way amounts to a consideration of the merits of the cases. Nor does it indicate approval of the appellate court's action. (People v. Vance (1979), 76 Ill.2d 171, 183.) Therefore, this is the first time these cases have been before us on the merits. Our review may cover all matters properly raised and passed on in the course of litigation. (Weiland Tool & Manufacturing Co. v. Whitney (1969), 44 Ill.2d 105, 113-14.) In Vendo Co. v. Stoner (1974), 58 Ill.2d 289, 306, this court held that the law of the case is not applicable to this court in reviewing the judgment of the appellate court.
The judgments of the appellate court were not final judgments in the sense that they did not terminate the litigation but remanded the cases to the trial courts with directions that judgments be entered, which judgments, in turn, would be appealable to the appellate court under our constitution. The appellate court's decisions, in turn, *443 would then be subject to review by this court through petitions for leave to appeal. (73 Ill.2d R. 315(a).) Since the judgments in these cases were still subject to the appellate process, they were not to be given res judicata effect. The most that can be said of the appellate court's mandate in each case is that it established the law of the case.
There is a marked distinction, however, between a final judgment which is entitled to res judicata effect and, as here, a remand order establishing the law of the case. The former, if entered by a court of competent jurisdiction, is unassailable by any court, while the latter is subject to change by direct review, or because during the pendency of an appeal, the highest court of the State, in a separate case, changes the applicable law which the intermediate reviewing court would be bound to apply. The doctrine of the law of the case and the change-in-law exception to it was recognized in Zerulla v. Supreme Lodge Order of Mutual Protection (1906), 223 Ill. 518. In Zerulla this court stated that:
"Where the Appellate Court or this court, on the first appeal to it, announces a particular view of the law governing the case and reverses and remands the case for further proceedings in accordance with the views announced, if the case is again brought before such court for review the former decision is binding on the court making it, and the questions decided and determined by it on the first appeal are not open for re-consideration on the second appeal. But while the determination of a question of law by the Appellate Court on the first appeal may, as a general rule, be binding upon it on the second appeal, it certainly cannot be binding on this court. Nor would the Appellate Court on the second appeal, we apprehend, be obliged to adhere to a proposition of law laid down *444 on the first appeal, when this court had, since the first appeal, decided the precise question contrary to the rule announced by the Appellate Court. To so hold would lead to most illogical results." Zerulla v. Supreme Lodge Order of Mutual Protection (1906), 223 Ill. 518, 520.
We noted earlier that since this case is before us on the merits for the first time, we are not bound by any findings made by the appellate court and can simply decide this appeal based upon Lenard. (Weiland Tool & Manufacturing Co. v. Whitney (1969), 44 Ill.2d 105, 113-14.) Also, inasmuch as our decision in Lenard was rendered after the mandates of the appellate court and before the final adjudication of these cases, the law of the case as announced by the appellate court was nullified by our decision in Lenard. Regardless of the mandates, to avoid "illogical results," these cases should have been decided on their second appeal in accordance with the law announced in Lenard.
In Lenard, we held that the teacher must meet the semester-hour requirements contained in the applicable version of Circular Series A, No. 160, which specifically applied to departmentalized studies at the grade level for which reinstatement was sought. (74 Ill.2d 260, 265.) The undisputed facts in that case established that Lenard did not meet those requirements. Therefore, he was not qualified to teach in the position available as a matter of law. (74 Ill.2d 260, 269.) In the instant appeal the record establishes that Mary Foley sought reinstatement to a departmentalized program as a reading, mathematics, and music teacher. Although there is an indication that she did not possess the Circular Series A, No. 160, required semester hours for those classes, we find nothing in the record before us to indicate that she sought this position at a grade level to which the additional requirements of Circular Series A, No. 160, apply. Since we cannot determine *445 the fact question of whether Mary Foley met the requirements in effect at the time she sought reinstatement, her cause must be remanded for further proceedings.
Similarly, although Norma Relph sought reinstatement to a teaching position in home economics at a level and in a program to which the Circular Series A, No. 160, subject matter requirements applied, there was also a position available to her as a reading teacher. The affidavits filed in support of the board's motion for summary judgment established that Norma Relph was not qualified to teach economics. However, an affidavit filed on behalf of Norma Relph alleged that Circular Series A, No. 160, was silent as to any requirements beyond a valid certificate for teaching the subject of reading. Norma Relph possessed the required certificate. This allegation stands in direct conflict with statements contained in respondent's affidavits that allege Norma Relph was not qualified under Circular Series A, No. 160, to teach in any of the available positions. This conflict presented a genuine issue of material fact as to Norma Relph's qualifications to teach, reading thereby precluding this court from disposing of her case in this appeal.
On remand, the trial courts are instructed to determine the petitioners' qualifications to teach under the applicable provisions of Circular Series A, No. 160, in effect at the time reinstatement was sought. If the court in either case determines that the petitioner therein is "legally qualified" to hold any of the then available positions, reinstatement should be compelled through issuance of the writ of mandamus and motions to award damages should be entertained.
Judgments reversed; causes remanded, with directions.
