
96 Pa. Commonwealth Ct. 129 (1986)
506 A.2d 1001
Frank Cabell, Appellant
v.
The City of Hazleton et al., Appellees.
No. 499 C.D. 1985.
Commonwealth Court of Pennsylvania.
Argued November 14, 1985.
March 24, 1986.
*130 Argued November 14, 1985, before Judges MacPHAIL and DOYLE, and Senior Judge BARBIERI, sitting as a panel of three.
Maurice A. Cardone, with him, Gifford S. Cappellini, for appellant.
James A. Schneider, for appellee, City of Hazleton.
James S. Palermo, for appellee, Louis Blass.
OPINION BY JUDGE MacPHAIL, March 24, 1986:
Frank Cabell (Appellant) appeals from an order of the Court of Common Pleas of Luzerne County denying his motion for post-trial relief in the nature of judgment non obstante veredicto and his motion for a new trial. We reverse and grant Appellant's motion for a new trial.
This case has been pending since June 4, 1982, when Appellant filed suit against the city of Hazleton, *131 the Council of the City of Hazleton and Louis Blass (Appellees) in quo warranto and mandamus.[1] Appellant avers that Mr. Blass is currently filling a seat on the Greater Hazleton Joint Sewer Authority (Authority) which Appellant rightfully should be filling.
The facts giving rise to Appellant's complaint are quite complex, as is the procedural history of the case. Suffice it to say that Appellant alleged that the Authority improperly enacted a resolution on November 9, 1981, appointing Louis Blass to Appellant's position on the board of Authority and declaring that Appellant's position had expired on January 5, 1981, when, in fact, his term would not expire until the first Monday in January of 1982. Appellant avers that this renders Blass' appointment a nullity. He commenced this action on June 4, 1982. The case went to trial before the Court of Common Pleas without a jury on January 19, 1984, and that Court rendered a verdict on March 9, 1984, against Appellant. The trial court justified its decision solely on the basis that Appellant's action was barred by laches; it reached no conclusions with respect to the merits of the case. None of the Appellees had at any time raised the equitable defense of laches, however. After considering Appellant's post-trial motions, which contested the trial court's action in raising the defense of laches sua sponte and its conduct when it interrogated Appellant, the Court concluded that its decision was correct. We disagree.[2]
*132 After a careful review of the record, we hold that the trial court did not abuse its discretion in its questioning of Appellant.
It is true, as the Common Pleas Court stated, that laches is an equitable defense that may be raised in actions in mandamus and quo warranto. Erway v. Wallace, 51 Pa. Commonwealth Ct. 561, 415 A.2d 116 (1980) (mandamus); Leedom v. Thomas, 473 Pa. 193, 373 A.2d 1329 (1977) (quo warranto). It must be raised by the defendant, however. The court cannot, as it did in this case, raise sua sponte the issue of laches in proceedings concerning an action in mandamus and in quo warranto.
The Common Pleas Court, in its opinion denying Appellant's motion, relied on Pa. R.C.P. No. 1509(b):
The objections of laches and failure to exercise or exhaust a statutory remedy may be raised by preliminary objection, answer or reply but are not waived if not pleaded.
The Court also relies on the following quote from Martin v. Adams County Area Vocational Technical School Authority, 11 Pa. Commonwealth Ct. 292, 295, 313 A.2d 785, 786 (1973): "even where laches is not pleaded at all as a defense, the Court may, in its discretion, and on its own motion grant relief where the fact of laches appears in the evidence or on the face of the bill."
*133 The Common Pleas Court erred in applying Pa. R.C.P. No. 1509(b) and the Martin case to the situation at hand. Rule 1509 applies solely to actions in equity. The Martin case dealt with an action in equity in which the defense of laches had been raised by preliminary objection. Actions in mandamus and quo warranto are actions at law, not in equity. See Taggart v. Board of Directors of Canon-McMillan Joint School System, 409 Pa. 33, 185 A.2d 332 (1962) (mandamus); Cella v. Davidson, 304 Pa. 389, 156 A. 99 (1931) (quo warranto). The language in Martin relied upon by the trial court to justify its action in raising the defense of laches sua sponte, is taken from Grange National Bank v. First National Bank of Bradford, 330 Pa. 1, 198 A. 321 (1938). It again must be noted that our Supreme Court there was considering an action in equity.
Pa. R.C.P. No. 1030, which applies to both actions in mandamus and quo warranto through Pa. R.C.P. No. 1091 and Pa. R.C.P. No. 1111, states:
All affirmative defenses including but not limited to the defenses of accord and satisfaction, arbitration and award, assumption of risk, consent, contributory negligence, discharge in bankruptcy, duress, estoppel, failure of consideration, fair comment, fraud, illegality, immunity from suit, impossibility of performance, justification, laches, license, payment, privilege, release, res judicata, statute of frauds, statute of limitations, truth and waiver shall be pleaded in a responsive pleading under the heading `New Matter'. A party may set forth as new matter any other material facts which are not merely denials of the averments of the preceding pleading. (Emphasis added.)
If a defense is not properly pleaded, it is waived. Department of Transportation v. Pace, 64 Pa. Commonwealth *134 Ct. 273, 439 A.2d 1320 (1982); Pa. R.C.P. No. 1032.
Our Supreme Court has stated, in a case dealing with a mandamus action, that in such case the defense of laches "must be raised as an affirmative defense in a responsive pleading under the heading `New Matter.' See Pa. R.C.P. No. 1030." Rose Tree Media School District v. Department of Public Instruction, 431 Pa. 233, 238-39, 244 A.2d 754, 756 (1968). The Supreme Court clearly indicates that Pa. R.C.P. No. 1030 should apply to mandamus actions, not Pa. R.C.P. No. 1509, as the Common Pleas Court's opinion states. We are of the opinion that the same principle should hold true for actions in quo warranto. Actions in quo warranto are similar to those in mandamus in that both are legal actions guided by equitable principles.
We, therefore, disapprove of the action of the Common Pleas Court in the instant case whereby it raised a defense on behalf of Appellees which, under the Rules of Civil Procedure, Appellees were required to raise themselves. It is not the function of a jurist to act as an advocate. Wojciechowski v. Murray, 345 Pa. Superior Ct. 138, 497 A.2d 1342 (1985).[3]
We hold that the trial court committed an error of law when it raised the issue of laches sua sponte and that Appellees have waived the defense of laches since they did not plead it.
Inasmuch as the trial court erred in its denial of the Appellant's motions as a matter of law, we must reverse. Because the trial court reached no conclusions on the merits of the case we cannot order that judgment n.o.v. *135 be entered nor can we, because of the posture of the case before us, remand for reconsideration. Our only alternative is to direct that a new trial be granted

ORDER
The Luzerne County Common Pleas Court order dated February 4, 1985, No. 1965-C of 1982, denying the motion of Frank Cabell for a new trial is reversed.
NOTES
[1]  Appellant originally named also the individual members of the City Council as defendants. They were dismissed from the case when it went to trial.
[2]  We note that our scope of review when considering a motion for judgment non obstante veredicto is very narrow; we are concerned only with determining whether there was sufficient competent evidence to sustain the verdict, granting the verdict winner the benefit of every reasonable inference reasonably to be drawn from the evidence and rejecting all unfavorable testimony and inferences. Seewagen v. Vanderkluet, 338 Pa. Superior Ct. 534, 488 A.2d 21 (1985).

As for our scope of review of the Appellant's motion for a new trial, the Common Pleas Court's ruling will not be reversed on appeal absent either an error of law which controlled the outcome of the case or an abuse of discretion where the ruling turns on the weight of the evidence. Martin v. Johns-Manville Corp., 508 Pa. 154, 494 A.2d 1088 (1985); Benkovitz Appeal, 56 Pa. Commonwealth Ct. 523, 425 A.2d 1178 (1981).
[3]  We note further that for laches to apply there must be a showing of some prejudice to the Authority and, notwithstanding the trial court's language that there was prejudice to the Authority, we find nothing in the record which would support that conclusion.
