Opinion by
Mr. Justice Cohen,Plaintiff appeals from a judgment of the Court of Common Pleas of Fayette County entered after the court en banc overruled exceptions to the dismissal of his complaint in mandamus in which he sought reinstatement as the supervising principal of the defendant school district and payment of his statutory compensation during the period of his suspension.
The plaintiff was elected supervising principal of Luzerne Township School District at a meeting of defendant school directors on July 1, 1955, and on the same date was given a duly executed professional employe contract. Thereafter, the plaintiff performed the duties of his post until June 25, 1956, when, at a special meeting of the school directors, a resolution was passed abolishing the position of supervising principal and suspending plaintiff from his employment. Although there was testimony before the court below that this action was taken as an “economy measure,” no reason therefor was recorded in the minutes of the meeting; nor is there evidence that there had been previous discussion or approval of this action by the di*214rectors, the county superintendent or the superintendent of public instruction.
After the plaintiff’s exceptions to the dismissal of his complaint were overruled, the defendants, on their own' volition, reinstated him as supervising principal of the school district as of September 3, 1957. However, they refused him compensation for the period of his suspension. For this reason the plaintiff has taken the present appeal.
Although the plaintiff has been reinstated voluntarily, his entire cause of action was not thereby rendered moot. Defendants cannot defeat plaintiff’s claim for damages by complying with his demand for reinstatement to his position after this action of mandamus was brought. See 55 C.J.S., Mandamus, §342 (1948).
Furthermore, mandamus remains the appropriate remedy to determine to what portion- of his unpaid salary plaintiff is entitled as damages, for plaintiff must still establish his right to the position of supervising principal from the date of his suspension until the date of his reinstatement.: See discussion in Cain v. Stucker, 159 Pa. Superior Ct. 466, 48 A. 2d 162 (1946) ; Rush v. Philadelphia, 62 Pa. Superior Ct. 80 (1916). We turn then to the merits of this appeal.
Under the provisions of the Public School Code of 1949, Act of March 10, 1949, P. L. 30, §1161, as amended, 24 P.S. §11-1161, the defendant board of school directors had the authority to employ a supervising principal as an aid to the efficient management of the school system. This power, we believe, necessarily carries with, it the right to abolish the position when, in the discretion of the board, the services of a supervising principal are no longer required: Smith v. Darby School District, 388 Pa. 301, 130 A. 2d 661 (1957). In the present case the right of the board, to abolish . the post .of supervising.principal is not questioned and we *215are here concerned only with the treatment of an employe whose position has been abolished.
As a supervising principal plaintiff is a professional employe within the meaning of the-School Code: Act of March 10, 1949, P. L. 30, §1101, as amended, 24 P.S. §11-1101. As such his status could only be changed in accordance with the protective tenure provisions of the Code. Consistent with these provisions the defendant school directors could have summarily transferred the plaintiff to a position equal to or greater than his former post in status and salary: Ritzie Appeal, 372 Pa. 588, 94 A. 2d 729 (1953). Alternatively, they could have demoted the plaintiff to an inferior position provided that they first accorded him a hearing: Smith v. Darby School District, supra; Act of March 10, 1949, P. L. 30, §1151, 24 P.S. §11-1151. Further,-the school directors could have dismissed plaintiff, but only for the causes set forth in the code and in the manner prescribed therein: Smith v. Darby School District, supra; Act of March 10, 1949, P. L. 30, §1122, as amended, 24 P.S. §11-1122 (Supp).
However, the deféndants, after deciding to abolish the position of supervising principal, chose not to take any of the above actions with respect to the plaintiff, but instead elected to suspend him forthwith. The only causes set forth in the Code for which a suspension can be imposed are: “(1) Substantial decrease in pupil.enrollment in the school district; (2) Curtailment or alteration of educational program ... [under certain circumstances when recommended and approved by. appropriate officials]; (3) Consolidation of schools . . . .” Act of March 10, 1949, P. L. 30, §1124, 24 P.S. 11-1124.1
*216The record indicates that none of the above enumerated conditions existed in the school district at the time of plaintiff’s suspension. Therefore, since the board’s action could not have been prompted by any of the causes specified in the Code, the suspension was unlawful.2 “The Board has no discretion as to whether it will comply with the clear provisions of the Act of . . . [1949]. Since it attempted to suspend . . . appellant in direct contravention of the Act and for causes not sanctioned thereby, its action was without statutory authority. It follows that appellant’s resort to ‘action by alternative mandamus was proper to enforce the statutory duty imposed upon the school board which in the absence of proper grounds for non-compliance, was mandatory’ . . .” Bragg v. Swarthmore School District, 337 Pa. 363, 368, 11 A. 2d 152 (1940). Cf. Simpson v. South Mahoning Township School Board, 365 Pa. 567, 76 A. 2d 385 (1950). Accordingly, we must reverse the judgment of the court below and remit the record thereto with instructions to determine the amount of damages to which plaintiff is entitled. See Coble v. Metal Township School District, 178 Pa. Superior Ct. 301, 116 A. 2d 113 (1955).
Judgment reversed with a procedendo.
Nevertheless, even though a school board ostensibly complies with the substantive and procedural requirements of the- code, -if its action in fact is taken arbitrarily or discriminatorily, or stems *216from personal or partisan motives, it will be set aside: Houtz v. Coraopolis Borough School District, 357 Pa. 621, 55 A. 2d 375 (1947).
The power of a school board under appropriate circumstances to suspend a professional employe during the pendency of a proceeding for discharge is not here involved. Kaplan v. Philadelphia School District, 388 Pa. 213, 130 A. 2d 672 (1957).