
605 S.W.2d 789 (1980)
Mary and John NORVAL, Jr., etc., Appellants,
v.
Kenneth WHITESELL, Jr., et al., Respondents.
No. 61910.
Supreme Court of Missouri, En Banc.
September 9, 1980.
Mark R. Singer, Overland Park, Kan., Arthur A. Benson, II, Kansas City, for appellants.
Ray Fowler, Nevada, for respondents.
ALDEN A. STOCKARD, Special Judge.
Appellants' petition for a declaratory judgment and injunctive relief was dismissed by the trial court on the basis that the judgment in a previous case was res judicata of the issues pleaded. The judgment of dismissal was affirmed by the Missouri Court of Appeals, Southern District, but on application of appellants the case was transferred to this court.
In Count I of their petition appellants alleged they are the parents of a student attending the secondary school in the R-2 School System located at El Dorado *790 Springs, Missouri, and that pursuant to a rule adopted by the School Board of said district the respondents, as officials of that district, have informed them that children attending the El Dorado High School would not be loaned free textbooks unless they made a cash deposit in the amount of $7.00 as a book deposit. They further allege that the rule is arbitrary, capricious and beyond the authority of the said School Board, and that it violates § 170.051 RSMo 1978, and Art. IX, § 1(a) Const. Mo.
By Count II of their petition appellants sought an injunction prohibiting such alleged unlawful conduct of respondents, and by Count III they asked for the return of the $7.00 collected from them.
A brief statement of the history of this and related litigation is necessary. In September 1973, Franz and Marian Penner filed suit in the Circuit Court of Cedar County, Missouri against the then members of the Board of Education of the R-2 School District at El Dorado Springs seeking a writ of mandamus. An alternative writ was issued. The petition alleged that the petitioners were the parents of two children who were students at the El Dorado High School, and that petitioners had been advised that textbooks would not be issued to their children unless a book deposit of $10.00 was made for each child. It was then alleged that the rule requiring the deposit was arbitrary, capricious, unreasonable and unlawful, and that petitioners had no plain, speedy or adequate remedy at law for the reason that any proceeding other than mandamus would not be finally determined until after an unreasonable time had expired. In the return to the alternative writ the defendants responded that the children had been tendered textbooks conditioned upon the payment of a cash deposit of $7.00 per student which would be refunded at the end of the school year if the books were returned in good condition, and that at the student's option a locker could be rented at the rate of $3.00 a year. In October, 1973 the court entered judgment denying the writ of mandamus. No appeal was perfected.
In July 1974 the Penners filed a second suit in the same court in which they sought a declaratory judgment that the requirement of a book deposit violated § 170.051 RSMo and that the requirement was in violation of the Missouri Constitution. The defendants filed a motion to dismiss alleging, among other grounds, that the judgment in the mandamus action was res judicata. The petition was dismissed and the judgment of dismissal was affirmed by the Missouri Court of Appeals. Penner v. Whitesell, 538 S.W.2d 772 (Mo.App.1976).
On December 2, 1975 the petition in the pending suit was filed by appellants, and respondents filed a motion to dismiss in which they alleged that the judgments in the two previous cases disposed of the issues and therefore constituted res judicata. That motion was sustained and this appeal followed.
The issue in this case is whether the final judgment entered in 1973 denying the Penners a writ of mandamus is res judicata as to appellants in this suit for a declaratory judgment and injunctive relief. We hold that it was not.
What is referred to as the doctrine of estoppel by judgment is set forth in Prentzler v. Schneider, 411 S.W.2d 135, 138 (Mo. banc 1966) by way of a quotation from Norwood v. Norwood, 353 Mo. 548, 183 S.W.2d 118, l. c. 122-123 as follows:
"`Generally, in order to have estoppel by a former judgment (res adjudicata), there must be: (1) Identity of the thing sued for; (2) identity of the cause of action; (3) identity of the persons and parties to the action; and (4) identity of the quality of the person for or against whom the claim is made, Rossi v. Davis et al., 345 Mo. 362, 133 S.W.2d 363, loc. cit. 373, 125 A.L.R. 1111, and cases there cited. The rule stated is, however, general and not exclusive. Res adjudicata may be as to a judgment or as to some particular facts litigated between the parties. In re McMenamy's Guardianship, 307 Mo. 98, loc. cit. 110, 270 S.W. 662, loc. cit. 665; Boillot v. Income Guaranty Co., Mo.App., 124 S.W.2d 608, loc. cit. 611. * * * "A *791 fact or question which was actually and directly in issue in a former suit, and was there judicially passed upon and determined by a domestic court of competent jurisdiction, is conclusively settled by the judgment therein, so far as concerns the parties to that action and persons in privity with them, and cannot be again litigated in any future action between such parties or privies, in the same court or in any other court of concurrent jurisdiction, upon either the same or a different cause of action. This doctrine, that a fact or question which has been actually and directly in issue in a former suit and has been judicially passed upon and determined by a domestic court of competent jurisdiction cannot be litigated again in a subsequent suit between the same parties or their privies, is simple and universally recognized in almost innumerable cases, the only difficulty or conflict being in its application to particular cases."'" (Emphasis theirs.)
There was no identity of parties plaintiff in the mandamus action brought by the Penners and in the pending action brought by appellants for a declaratory judgment, and obviously there was no identity of the causes of action. But as noted in the above quotation, the rule there announced is general, and there are some situations in which the rule requiring identity of parties is not strictly applicable because of the doctrine of "virtual representation." Seibert v. City of Columbia, 461 S.W.2d 808 (Mo. banc 1970). In Drainage Dist. No. 1 Reformed of Stoddard County v. Matthews, 361 Mo. 286, 234 S.W.2d 567, 573 (1950), this court said: "`In the absence of fraud or collusion a judgment for or against a municipal corporation, county, town, school or irrigation district, or other local governmental agency or district or a board or officers properly representing it, is binding and conclusive on all residents, citizens and taxpayers in respect to matters adjudicated which are of general or public interest such as questions relating to public property, contracts or other obligations.'" (Emphasis added.) We agree with the doctrine of virtual representation when appropriate, and as stated in the Seibert case supra at p. 811, which involved a challenge to an annexation, "[I]t would be unthinkable in our system of jurisprudence to hold that each taxpayer of a municipality could bring a suit to attack an annexation and that res judicata would not apply because there was not an identity of parties." However the doctrine of res judicata applies only to matters adjudicated, and although mandamus is a legal and not an equitable remedy, it will not issue where there is another adequate ordinary remedy, State ex rel. Keystone Laundry and Dry Cleaners, Inc. v. McDonnell, 426 S.W.2d 11 (Mo.1968). It is not a writ of right, but its issuance lies in the sound discretion of the court. State ex rel McGarry v. Kirkwood, 423 S.W.2d 205 (Mo. App.1967). We agree with the statement in 50 C.J.S. Judgments § 608 at p. 32, quoted with approval in State ex rel. Hamilton v. Cohn, 1 Wash.2d 54, 95 P.2d 38, as follows:
"It is well settled that a final judgment rendered on the merits of an application for a peremptory writ of mandamus comes within the principle of res judicata, and is a bar to another application for the same writ by the same party under the same circumstances, or to another action involving the same issues or in which the same relief is sought, provided the decision proceeds on the merits; and it has also been held that, where mandamus will not lie as of strict right, but may be refused in the discretion of the court, a denial of that remedy does not bar a subsequent action."
A writ of mandamus is a hard and fast unreasoning writ, and is reserved for extraordinary emergencies. State on Inf. Barker ex rel. Kansas City v. Kansas City Gas Co., 254 Mo. 515, 163 S.W. 854 (1913); State ex rel. Horton v. Bourke, 344 Mo. 826, 129 S.W.2d 866 (1939). As noted above it is not a writ of right. Therefore, the refusal of the writ requested by the Penners was not necessarily the result of a ruling on the merits.
We express no view as to the merits of appellants' claim, but in the particular circumstances of this case the doctrine of res *792 judicata should not prevent them from obtaining a judicial determination of its merits.
The judgment is reversed and the cause remanded.
BARDGETT, C. J., RENDLEN, SEILER, WELLIVER and HIGGINS, JJ., and WELBORN, Special Judge, concur.
MORGAN and DONNELLY, JJ., not sitting.
