Opinion by
The instant appeal presents another aspect of a dispute within an international labor union, Brotherhood of Railway and Steamship Clerks, Freight Handlers; Express and Station Employees (herein called Brotherhood), a dispute which was the subject of a previous decision of this Court: Grand Lodge of the Brotherhood of Railway and Steamship Clerks v. Girard Lodge No. 100, 384 Pa. 248, 120 A. 2d 523. In that decision- we upheld the Brotherhood’s revocation of the charters of four of its local lodges because of what we termed a “rebellion” of the members of those lodges.
The present action in assumpsit1 -brought by appellant — the wife and assignee of Joseph P. Zawada, one. of the principal participants in the “rebellion” — seeks the recovery of compensation from the Brotherhood for *210Zawada’s services rendered to tbe Brotherhood from February 1954 to December 1956.
Article 1 of the “Protective Laws” of the Brotherhood provides, inter alia, that each local lodge shall elect a “Protective Committee” which shall consist of three or more members of the lodge, headed by a Chairman, who shall serve four year terms. Where there are several lodges within one division of a single railroad the Chairmen of the “Protective Committees” of the local lodges in the division shall elect from among their own number a “Division Chairman” whose duty is to represent the entire union membership of the division in all matters concerning grievances at the division level. Only Chairmen of the “Protective Committees” of the local lodges in the division are eligible for election to the post of “Division Chairman”.
At the time the present controversy arose there were six lodges of the Brotherhood in the Philadelphia Terminal Division of the Pennsylvania Railroad. Zawada —appellant’s husband and assignor — was “Division Chairman” of the lodges, having been elected to this position for the four year period, 1952-1956, by the Chairmen of the “Protective Committees” of the six lodges in the division. When elected, Zawada was the “Protective Chairman” of Girard Lodge No. 100.
On February 1, 1954 the Grand President of the Brotherhood declared a forfeiture of the charters of the Girard Lodge and three other lodges in the division because of their deliberate refusal to pay their quarterly per capita tax to the Brotherhood.2 The forfeiture of these charters was upheld by this Court and the four lodges were directed to turn over to the Brother*211hood their charters, supplies, boohs, records, funds and all other property which, by reason of the forfeiture, became the property of the Grand Lodge of the Brotherhood.
On February 8, 1954 the Grand President of the Brotherhood notified Zawada that he was no longer qualified to hold the office of “District Chairman” because of the forfeiture of the charter of Girard Lodge from which his representative status was derived and he was directed to surrender the records and files in his possession to the “Acting Division Chairman” appointed by the Brotherhood to replace him. On two occasions the “Acting Division Chairman” demanded these records and files but Zawada refused to surrender them. Instead, the four lodges went into Court of Common Pleas No. 1 of Philadelphia County where they obtained orders which restrained the Brotherhood from interfering with the performance of the duties of the elected officials of the four lodges until a final disposition by the Court of the charter forfeiture litigation. Later on, the court approved an agreement of counsel, in implementation of the restraining order, which provided that Zawada and the “Acting Division Chairman” should, pending final determination of the charter forfeiture litigation, jointly execute certain documents concerning grievances and that the “Protective Chairmen” of the four lodges could continue to file and process grievance claims just as they had done prior to the initiation of any litigation.
Under these court orders and the implementing agreement of counsel Zawada and the “Acting Division Chairman” worked together for approximately 29 months.3 Upon final determination of the charter for*212feiture litigation tbe four lodges were disbanded and Zawada ceased to function in any capacity whatsoever in tbe union affairs.
Tbe trial judge construed the complaint in the present action to be based upon an alleged verbal contract between Zawada and the Brotherhood which required that appellee pay to Zawada the salary attached to the position to which he had been elected and which he contended he still held after February 1, 1954. This action was tried without a jury and, on August 3, 1956, the trial judge filed a memorandum opinion in which he found for appellee upon the ground there was not a verbal contract between the parties to pay to Zawada a salary,4 and in which he expressly refused to pass upon Zawada’s right to recover the reasonable value of his services on the basis of a quantum meruit in this action. Appellant at this point had the choice of either filing exceptions to the court’s dismissal of her assumpsit action, or, of seeking a recovery upon the theory of a quantum meruit. The appellant chose the latter course; she contended that she had never based her claim upon the theory of an express contract and that, since she had already proven that Zawada had a right to recover upon a quantum meruit basis, she did not have to file a new action. Having adopted this position, appellant, instead of amending her original complaint or instituting a new suit, sought to amend her answer to new matter in this action by averring that “an implied contract exists for the payment of services rendered by the [appellant’s] assignor; that in any *213event [appellant] is entitled to recover on a quantum meruit basis for services rendered to the [appellee] by her assignor”.
In a second memorandum opinion, filed September 19, 1956, the trial judge very properly dismissed appellant’s motion to amend. An examination of the complaint does not reveal any specific allegation either of an express or an implied contract; in fact, neither the word contract nor the words quantum meruit appear in the complaint. It was in the answer to new matter averred by the appellee that the appellant, by implication, pleaded an express verbal contract when she denied appellee’s averment that no contract existed. The only possible theory of the appellant’s complaint is that it is based on an express contract; this being so, within its framework, no right to recover on the theory of a quantum meruit, or an implied contract, can be sustained.
That the two actions — quantum meruit and express contract — are utterly distinct in nature is clear beyond question: Lach v. Fleth, Admr., 361 Pa. 340, 348, 64 A. 2d 821; John Conti Co., Inc. v. Donovan, 358 Pa. 566, 572, 57 A. 2d 872; Cramer v. McKinney et al., Executors, 355 Pa. 202, 204, 49 A. 2d 374. After a failure to prove an express contract to pay a sum agreed upon by the parties for services a claimant cannot then be allowed to recover in the same action the reasonable value of those services on the basis of a quantum meruit; such a claim must first be pleaded so that the defendant may have an opportunity to assert whatever defenses he may have against it: Burr Estate, 381 Pa. 547, 548, 112 A. 2d 712; Cramer v. McKinney, 355 Pa. 202, 204, 49 A. 2d 374, supra; Witten v. Stout, Executor, 284 Pa. 410, 412, 131 A. 360; Bemis et ux. v. VanPelt, Exr., et al., 139 Pa. Superior Ct. 282, 289, 290, 11 A. 2d 499. While the *214appellant was not barred from bringing an action based on quantum meruit by tbe adverse decision in tbe action on an express contract (Bassis v. Rutenberg, 177 Pa. Superior Ct. 339, 110 A. 2d 897), yet tbe trial judge very properly refused to allow ber to accomplish tbe same result by merely amending ber pleadings, thereby preventing the appellee from setting up any defenses it might have against recovery on a quantum meruit and compelling tbe court to decide the issue solely upon the basis of tbe original testimony.
By tbe time the second opinion of tbe court below was filed the period during which exceptions to the court’s first opinion and order could be filed by appellant had expired, in spite of the fact that the parties had, by stipulation, extended this period to September 14, 1956. The cautionary period during which all proceedings were to stay had also expired because of the second opinion and the appellee, therefore, entered judgment against the appellant in the contract action on September 20, 1956.
The appellant neither took an appeal from this judgment nor instituted a new action on the basis of a quantum meruit. Instead, she filed, belatedly, exceptions to the findings in the contract action, together with exceptions — filed timely — to the dismissal of her motion to amend and coupled these exceptions with a motion to strike off the judgment.
At this juncture, on December 18, 1956, the parties entered into a written stipulation, approved by the court, which provided that the judgment should be opened upon certain stated conditions. This stipulation clearly and distinctly provided that the propositions stated in the court’s memorandum opinion of August 8, 1956 should be considered res judicata but that the appellant could proceed on the basis of a quantum meruit without either amendment of her *215complaint or the initiation of a new action. Briefs were then filed by the parties, no additional testimony was taken and, on March 21, 1957, the court below filed its third opinion, finding that appellant could not recover from appellee upon the basis of a quantum meruit.
On June 18,1957 the fourth and final opinion of the court below was filed, dismissing the appellant’s exceptions to its refusal to grant a rule to show cause why the case should not be reopened. Judgment was again entered for the appellee and the present appeal was taken.
A considerable portion of the appellant’s argument before this Court is foreclosed to her by the written stipulation to which she was a voluntary party in the court below. This stipulation gave appellant certain distinct advantages. At that time the appellant had permitted the period during which exceptions could be filed to the first opinion and order to elapse without taking action. Furthermore, on the date on which the stipulation was made only two days remained of the period prescribed by statute during which she could take an appeal to this Court from the judgment entered in the contract action: Act of May 19, 1897, P.L. 67, §4, as amended, 12 PS §1136. Instead of perfecting such an appeal she bargained for and secured the opening of the judgment on the clearly expressed condition that the decision in the contract action should be res judicata. It is evident that the appellant entered into this stipulation because she deemed it advantageous to the strategic conduct of her case; by means of it she was able to present her argument for recovery on the basis of quantum meruit without either bringing a new action or amending her complaint in the first action. Appellant greatly benefited in this respect because the lower court, in its second opinion, *216had expressly denied her right to do this very thing and. its allowance dispensed with the necessity for faking additional testimony. However, the appellant, •in bargaining for these advantages, elected to abandon any claim for recovery on the theory of an express contract. We, therefore, will not consider the various aspects of that issue on which she has consented to be bound.
The appellant’s contention that she is entitled to .recovery on the basis of a quantum meruit is founded upon the recognition by the court below in its first opinion that Zawada had done a great amount of work by. which the Brotherhood or its members benefited. Appellee does not deny the performance of services .by Zawada but it contends, and the lower court so held in its third opinion, that Zawada’s assignee can-mot recover the reasonable value of such services because those services were thrust upon the appellee by the court order restraining the appellee from interfering with Zawada’s functions and were, therefore, not voluntarily accepted by the appellee.
The following facts were clearly established of record: (1) after the forfeiture of the lodge charters the appellee appointed a replacement for Zawada and notified him of this fact; (2) Zawada then refused to turn his files over to this replacement, thereby making it impossible for the replacement to process the grievances of the members of the lodges whose charters had been forfeited; (3) Zawada obtained a court order restraining the appellee from interfering with his processing of grievances; (4) the restraining order made no mention of salary or compensation to be paid to Zawada by the appellee; (5) the court order was implemented by an agreement of counsel dividing the grievance work between Zawada and his replacement; (6) the period of divided authority in the “Division *217Chairman’s” post was one of chaos; (7) some grievances which originated in a lodge not directly concerned, in the dispute were directed to Zawada for processing by the Brotherhood but the bulk of Zawada’s work came from the lodges involved in the dispute over the forfeiture; (8) at all times during this period of divided authority Zawada’s replacement was ready and able to perform the same services Zawada performed but was prevented from interfering with Zawada’s functions by the restraining order and the fact that Zawada had refused to surrender his grievance files.
These facts make it readily apparent that the appellant has established no right to recover for Zawad'a’s services on the basis of a quantum meruit. To the contrary, it is evident that whatever services Zawada performed were forced upon the appellee by the restraining order. It is readily inferable that Zawada1 created this chaotic situation because he expected that the charter forfeitures would be held unlawful by this Court and that then he would be entitled to prove his right to his regular salary as a duly elected officer of the Brotherhood during the entire period.
The principle of law applicable to the instant situation is analogous to that enunciated by this Court in Cooke v. Roberts, 335 Pa. 561, 7 A. 2d 357. The facts of that case, as stated in Commonwealth ex rel. Kelley v. Marinelli et al., 330 Pa. 82, 198 A. 623, disclose that the City Treasurer of Philadelphia had dismissed the Mercantile Appraisers of that city because of " a legislative change in the method for making appointments to that position. The City Treasurer made new appointments to the position, among whom was the appellant, Cooke. This Court," in the Cooke case, stated (p. 562) : “Court of Common Pleas No." 1 of Philadelphia held that [Cooke] had no title to tíiéoffice *218and entered judgment of ouster. Instead of abiding by that judgment, [Cooke] appealed to tliis court and, in addition, applied for and obtained an order superseding tbe ouster. When be did that, be made an election; be acted with knowledge that if tbe judgment against him was ultimately affirmed, be, having meanwhile been an incumbent de facto, would have rendered services subject to tbe rule that be could not recover the compensation which tbe law attached to tbe office and which was therefore payable to the de jure officer.”
The appellant seeks to avoid the effect of this salutary principle which bars recovery for services forced upon an employer by arguing that in the instant case Zawada was the de jure officer, wrongfully dismissed by the Brotherhood, and that the Acting Division Chairman appointed to replace him was not even a de facto officer; since the compensation attaches to the office, not the person, it properly should go to the officer de jure and not to the incumbent de facto. This argument, if it were sound, would give Zawada the right to recover the sum total of the emoluments of the office of Division Chairman for the period in question. Cf: Commonwealth ex. rel. Shoemaker v. Thomas et al., 328 Pa. 19, 195 A. 103; Jones v. Dusman, 246 Pa. 513; 92 A. 707. This argument, albeit ingenious, is without merit in. view of the lower court’s holding, voluntarily acquiesced in by the appellant, that Zawada was not wrongfully deposed from office and, in fact, was not even dismissed at all, but simply became ineligible to hold the position because of the forfeiture of the charter of the lodge from which his status as a representative officer derived. Under this holding Zawada cannot be considered the de jure — the lawful— officer who was deposed by the Brotherhood’s appointee. To argue that Zawada was the de jure officer is to collaterally attack the trial court’s decision on the *219contract question wbicli the appellant stipulated was to be res judicata.
The principles which underly the theory of quantum meruit are expressed in § §1 and 2 of the Restatement, Restitution, which states: “§1. A person who has been unjustly enriched at the expense of another is required to make restitution to the other. §2. A person who officiously confers a benefit upon another is not entitled to restitution therefor.” In view of what we have said above the conclusion is inevitable that Za-wada’s services were officiously conferred, having been performed against the appellee’s wishes and in spite of the appellee’s best efforts to avoid them, and at a time when a legally appointed officer was available to perform the same services but was restrained from all interference with Zawada by the court order which Zawada had secured.
The appellant further argues that Zawada’s services, even though forced upon the appellee, were privileged because they were necessary for the protection of Zawada or of third persons. By this argument she seeks to come within the exception to §2 covered by §§112-117 of the Restatement, Restitution, contending that the appellee had failed to provide the members of the lodges involved in the “rebellion” with adequate non-discriminatory representation. As the lower court correctly pointed out, this argument is without merit because of the complete lack of evidence that the ap-pellee did not intend to provide all its members with representation and because the officer appointed for this purpose was prevented by Zawada’s efforts from functioning effectively.
The appellant also contends that the appellee was unjustly enriched because the “Acting Division Chairman” appointed by the Brotherhood as his replacement whs paid no extra salary for his services. The trial *220judge ruled out all questioning concerning such salary as irrelevant. With this ruling we are in complete accord. Whatever compensation was or was not received by the “Acting Division Chairman” would have no bearing at all on the cost to the Brotherhood of patching up the breach in its organizational framework caused by the acts of the rebellious locals and the resulting ineligibility of its “Division Chairman”.
The bitterness and strife within this international labor union over the last several years has been intense and we cannot help but note Zawada’s deep involvement throughout every aspect of the dispute. Zawada undoubtedly rendered services to the Brotherhood but, with the exception of a small amount of work with regard to a lodge not a party to the dispute but directly traceable to the chaos resulting from the division of authority, those services were forced upon the Brotherhood against its wishes and are of questionable worth. Nor can we disregard the fact that the Brotherhood was caused great expense in having to furnish one of its officers as Zawada’s successor, in having to furnish that successor with a staff of assistants and in being forced to suffer through a period of divided authority in its government which caused needless duplication of effort, chaos and loss of prestige. The record clearly shows that Zawada, while occupying his judicially protected office, was actively engaged in activities detrimental to the authority of the union. To allow Zawada’s assignee to recover the value of the services he forced upon' the appellee would frustrate the whole purpose of the law of restitution. Cf: Gerson v. Philadelphia, 342 Pa. 552, 555, 20 A. 2d 283.
Judgment affirmed.