
188 Cal.App.2d 761 (1961)
CHARLES C. STRATTON et al., Appellants,
v.
CITY OF LONG BEACH, Defendant and Respondent; THE PEOPLE, Intervener and Respondent.  [fn. *]
Civ. No. 23986. 
California Court of Appeals. Second Dist., Div. Three.  
Feb. 1, 1961.
 Sterling S. Clayton for Appellants.
 Gerald Desmond and Walhfred Jacobsen, City Attorneys, O'Melveny & Myers and Pierce Works for Defendant and Respondent.
 Stanley Mosk, Attorney General, and Howard S. Goldin, Deputy Attorney General, for Intervener and Respondent.
 VALLEE, J.
 Charles C. Stratton and Mark L. Taylor, members of The State Bar, called petitioners, appeal from a judgment that they take nothing by their petition for attorneys' fees arising out of services rendered in the above entitled cause and for expenses of suit.
 In 1911 the State of California committed to the trusteeship of the city of Long Beach all tidelands and submerged lands, referred to as tidelands, lying within the municipal limits of the city of Long Beach. (Stats. 1911, ch. 676, p. 1304.) A later grant in trust (Stats. 1925, ch. 102, p. 235) as amended (Stats. 1935, ch. 158, p. 793) enlarged the terms of the original grant to bring in subsequently annexed tidelands and to permit some additional uses. In general the trust was for the establishment, improvement, and conduct of a harbor and *764 for purposes of commerce, navigation, and fisheries, including production of oil and gas.
 In 1951 a statute was enacted releasing from the tidelands trust 50 per cent of all revenue theretofore derived and unexpended and to be derived from oil and gas, and other hydrocarbon substances other than dry gas, and 100 per cent of all revenue theretofore derived and to be derived from dry gas. The 1951 statute did not state to whom the released revenue should pass. (Stats. 1951, ch. 915, p. 2443.)
 After the effective date of the 1951 statute, Long Beach proceeded on the premise the revenues had been released to it in absolute ownership free from the terms of the trust and could be used for general municipal purposes. On January 16, 1953, the Long Beach Charter was amended to create the Public Improvement Fund and to authorize the transfer from trust funds of the revenues released by the 1951 statute. (Stats. 1953, ch. 22, p. 3823.) In general the amendment provided that the Public Improvement Fund should be a continuing fund which could be used for public improvements after prior approval of the electors of the city, except that without the prior approval of the electors by a vote of two-thirds of the council money in the fund could be used for land-subsidence remedial work or to meet a public emergency.
 In March 1953 $56,050,394.48 was transferred from tideland trust funds to the Public Improvement Fund. On April 3, 1953, the electors approved the expenditure of some $38,437,000 from the Public Improvement Fund for various public improvements.  [fn. 1]
 Petitioners Charles C. Stratton and Mark L. Taylor were then employed by Felix Mallon, a municipal taxpayer of the city of Long Beach, to commence and prosecute a suit to enjoin the city and its officers from appropriating and expending for general municipal purposes the income derived from the sale of oil and gas produced from the tide and submerged lands granted in trust to the city by the state. Pursuant thereto petitioners, on May 1, 1953, commenced the above entitled suit, Mallon v. City of Long Beach, to be referred to as the Mallon suit.
 The complaint alleged: Mallon was "a citizen of the United *765 States of America and the State of California, and a resident of the City of Long Beach, and he is and has been a resident and taxpayer within said city having paid a tax thereto within one year prior to the commencement of this proceeding"; the purposes for which the Public Improvement Fund was to be used were not in accordance with the trust imposed on the tide and submerged lands, and expenditure of the fund for such uses and purposes was unlawful; defendants claimed that by virtue of the 1951 statute and the amendment to the charter they were authorized to appropriate and expend trust moneys for such purposes; the Legislature, by virtue of article IV, section 31, of the Constitution was "without power to make a gift of anything of value to a municipal corporation; that the purported authorization as contained in the aforementioned statute and charter provision is in violation of said constitutional provision"; the Legislature, by the adoption of the 1951 statute and the approval of the charter amendments, wrongfully attempted to abdicate the state's trust of the property and funds "in which the whole people of the State of California are interested and which are held in trust for all of the people of the State of California."
 The prayer was that Long Beach and certain of its officers be enjoined "from appropriating and expending any monies derived from the defendant city from the production of oil, gas and other hydrocarbon substances from beneath tidelands or submerged lands granted to the defendant city by the State of California, for the purposes other than the improvement and conduct of a harbor on said lands and the construction, maintenance and operation on said lands of wharves, docks, piers, slips, quays and other utility structures and appliances necessary or convenient for the promotion and accom[m]odation of commerce and navigation, or for public park, parkway, highway or playground upon said lands."
 Demurrer was sustained to the complaint without leave. On appeal the judgment was reversed. The Supreme Court held that partial revocation of the trust effected by the 1951 statute necessarily resulted in reversion to the state of moneys thus released from the trust and that Long Beach held such funds on a resulting trust for the state. (Mallon v. City of Long Beach, 44 Cal.2d 199 [282 P.2d 481], decided April 5, 1955.)
 On August 25, 1955, in the course of proceedings on remand the trial court by ex parte order granted leave to the People of the State of California and Robert C. Kirkwood, the State *766 Controller, to intervene, and their complaint in intervention was filed on that date. The defendants moved to strike the complaint in intervention filed by the People. On March 1, 1956, the motion was granted.
 On September 16, 1955, the attorney general commenced a separate action,  [fn. 2] called the People's case, to protect the interests of the state in the funds which had been declared released from the trust. A compromise and settlement of that case were negotiated between Long Beach and the state. The Legislature passed an act which was signed by the governor on April 13, 1956,  [fn. 3] in which it found and determined, among other things, that: as a result of stipulations between the attorney general and the city of Long Beach, $111,000,000 had been impounded and certain future income would be impounded and held intact by the city pending determination of the litigation; the total amount of revenue secured and held by Long Beach for the benefit of the state free from the public trust on or before January 31, 1956, was $120,000,000; the public interest would be served by prompt release of these funds. The act authorized the attorney general and Long Beach to enter into stipulations as to the amount, not less than $120,000,000, to be paid to the state. A stipulation as to entry of decree was filed on April 13, 1956, and pursuant thereto on September 11, 1956, a consent judgment was entered ordering Long Beach to account for, pay and deliver to the State Controller $120,000,000 and to make monthly transfers of future revenue.
 Thereafter petitioners Stratton and Taylor filed a petition for attorneys' fees and expenses of suit in the Mallon suit. The petition averred in detail the services performed by petitioners in the Mallon suit. It averred that as a result of the services rendered by petitioners in researching, filing, and prosecuting the Mallon suit, the city and the taxpayers of Long Beach have and will be benefited to the extent of millions of dollars. It further averred that in the Mallon suit petitioners contended in both the trial and appellate courts that the 1951 statute could be construed in two ways: (1) it was void and the funds it released remained with Long Beach in trust for the uses specified in the grants; or (2) it constituted a partial revocation of the trust, freeing the released funds for other uses by the beneficiaries, the people of the state, and not the *767 city of Long Beach. The prayer was that "petitioners have judgment against the trust funds now in the possession, or which hereafter come into the possession of the City of Long Beach as trustee, and/or against the City of Long Beach, in the sum of $2,000,000.00."
 Answers to the petition were filed, a hearing was had, and a judgment rendered that petitioners take nothing. Among other things, the court found that the effect of the holding in Mallon v. City of Long Beach, 44 Cal.2d 199 [282 P.2d 481], was to deprive Long Beach tidelands trust of an amount stipulated for the purpose of the proceeding to be $200,000,000 which is in process of collection by the state through its attorney general, and "12. The only moneys or fund or trust fund involved in the above-entitled action consists of the said oil and dry gas revenue released from said tidelands trust and caused to be reverted to the State of California by said 1951 statute, to wit, the aforesaid stipulated sum of $200,000,000, consisting of moneys paid or payable by the City of Long Beach, as trustee of the resulting trust created by said 1951 statute, to the State of California. 13. The efforts of and services rendered by petitioners in the above-entitled action were not rendered for the benefit, nor did they inure to the benefit, of said trust fund. Said efforts and services were at all times adverse to said trust fund and opposed to the concept that the 1951 statute had any validity whatsoever, either as creating said resulting trust, or otherwise. 14. In said action petitioners did not contend or urge that said 1951 statute effected a partial revocation of the trust created by the above-mentioned statutes of 1911, 1925 and 1935, nor did petitioners contend or urge that said 1951 statute created a resulting trust for the benefit of the State of California; on the contrary, petitioners argued that the Legislature could not validly enact said 1951 statute. The establishment of the resulting trust was not a victory for, or a result won by, petitioners. ... 16. The said services rendered by petitioners resulted in no augmentation or increase in, or recovery of moneys for, the municipal treasury of the City of Long Beach. 17. Said services of petitioners, in conjunction with the services of the Petitioner Theodore R. Gabrielson, prevented the City of Long Beach from making the expenditures set forth in the Complaint, but considered in its entirety the decision of the Supreme Court was detrimental to and contrary to the interests of Felix Mallon and the class he represented and did not benefit him or such class, nor was it a victory or result won by *768 Petitioners Chas. C. Stratton and Mark L. Taylor, nor was it the result sought by said Felix Mallon or by such petitioners." Petitioners appeal from the judgment denying them compensation and reimbursement for expenses of suit.
 Petitioners assert first that they should be compensated from the released trust funds. They say they benefited those funds by preventing their misappropriation by Long Beach for use on municipal improvements; they prevented the threatened immediate misappropriation of some $38,000,000; by bringing before the court the important legal issues involved, they prevented what ultimately would have resulted in a $200,000,000 conversion of public trust funds. Petitioners concede "that neither they nor any party to the Mallon case created the 'released trust funds.' "
 [1] "Where a lawyer has rendered such valuable service as to make available a fund for a class, even though he appeared for only one claimant, it is equitable that his compensation and expenses should come from the entire fund saved for all classes concerned before it is distributed. [Citation.] Counsel's right to compensation under such circumstances arises from the benefit conferred upon those who would have suffered loss but for his timely intervention, and not by reason of an agreement to pay his fees. ... [2] As is stated in Estate of Marre, 18 Cal.2d 191, 192 [114 P.2d 591]: 'Plaintiffs who have succeeded in protecting, preserving or increasing a fund for the benefit of themselves and others may be awarded compensation from the fund for the services of their attorneys.' This principle is derived from the equitable concept that where one of a group has borne the cost of litigation resulting in benefit to the entire group, the latter should contribute to such expenses. [Citations.] Not only is it established that the litigant is entitled to be compensated for the expense he has incurred in the prosecution of such an action, but there is created in favor of the attorney who renders the service an equitable lien against the fund so preserved." (Winslow v. Harold G. Ferguson Corp., 25 Cal.2d 274, 284-285 [153 P.2d 714].)
 [3] "The bases of the equitable rule which permits surcharging a common fund with the expenses of its protection or recovery, including counsel fees, appear to be these: fairness to the successful litigant, who might otherwise receive no benefit because his recovery might be consumed by the expenses; correlative prevention of an unfair advantage to the others who are entitled to share in the fund and who should *769 bear their share of the burden of its recovery; encouragement of the attorney for the successful litigant, who will be more willing to undertake and diligently prosecute proper litigation for the protection or recovery of the fund if he is assured that he will be promptly and directly compensated should his efforts be successful." (Estate of Stauffer, 53 Cal.2d 124, 132 [346 P.2d 748].)
 [4] However, a lawyer is entitled to such an allowance of his fees only where his services operate to secure or collect and bring into the custody of the court the fund out of which he claims to be paid. (7 C.J.S.,  193, p. 1097.) [5] An allowance out of the fund cannot be made to a lawyer whose services were performed in behalf of adverse interests and in opposition to the fund. (Scott v. Superior Court, 208 Cal. 303, 307 [281 P. 55].) [6] A lawyer who renders services in recovering or preserving a fund in which a number of persons are interested may in equity be allowed his compensation out of the whole fund only where his services are rendered on behalf of, and are a benefit to, the common fund. (7 C.J.S.,  193, p. 1098.)
 [7] The result of the Mallon suit was that from the effective date of the 1951 statute Long Beach in addition to being a chartered municipal corporation was also:
 1. Trustee of the tidelands trust remaining after the effective date of the 1951 statute, consisting of the original corpus and of the avails therefrom diminished by 50 per cent of oil and gas revenue and 100 per cent of the dry gas revenue;
 2. Trustee of the resulting trust consisting of 50 per cent of oil and gas revenue and 100 per cent of dry gas revenue, each payable to the state.
 Petitioners' claim against the resulting trust depends on whether the findings mentioned are supported by substantial evidence.
 There is ample evidentiary support in the record for those findings. In Mallon v. City of Long Beach, 44 Cal.2d 199 [282 P.2d 481], decided April 5, 1955, in which Mallon was an appellant represented by petitioners, the Supreme Court held that the 1951 statute was constitutional and that it created a resulting trust of the revenues released in favor of the state. The defendants in the suit filed a petition for a rehearing. Petitioners on behalf of Mallon filed an answer to the petition which is set out in toto in the margin.  [fn. 4] In their answer petitioners *770 joined in the defendants' request for a rehearing. They stated they did not accede to the part of the decision which held the released revenues were held in a resulting trust by *771 Long Beach for the state. They said they still contended the funds remained "in trust in the City for the purposes set forth in the grant to the City, viz., commerce, navigation, fisheries, etc.," and that the Legislature in enacting the 1951 statute acted beyond its power with the result "that the subject funds shall continue to remain in trust in the City for the purposes set forth in the grants to the City." These express statements clearly evidence the opposition of petitioners to the determination of unrestricted ownership of the funds by the state. Petitioners throughout sought a decision that the released funds were the property of Long Beach as trustee to be used solely for the uses of the trust created by the statutes of 1911, 1925, and 1935. Their services were not for the benefit of the state or the resulting trust. Thus there was substantial evidence that petitioners' activities in the Mallon suit were antagonistic to the state and to the establishment of the resulting trust. They denied the existence and validity of the resulting trust from which they now seek compensation. Mallon, who employed petitioners, cannot be said to have discovered, preserved, or created a fund. The equitable rule relied on by petitioners does not authorize a deduction from the fund where the services sought to be compensated by a deduction from the fund have been performed in behalf of an adverse interest. (County of Tulare v. City of Dinuba, 205 Cal. 111, 119-128 [270 P. 201].)
 [8a] Petitioners assert that in any event they are entitled *772 to an award of attorneys' fees and expenses of suit from the city of Long Beach. They contend their services were of immense benefit to Long Beach and its taxpayers. They say: There is no dispute as to the fact that through their efforts Long Beach was prevented from misappropriating trust funds and immediately expending some $38,000,000; had there been no suit for an injunction, Long Beach ultimately could have appropriated and expended the entire $200,000,000 in trust funds. True, petitioners say, their efforts neither recovered moneys for, nor increased the funds in the treasury of Long Beach, but they did prevent it and its taxpayers from incurring a staggering debt to the state.
 [9] In Schaefer v. Berinstein, 180 Cal.App.2d 107 [4 Cal.Rptr. 236], this court stated (p. 139):
 " 'In the absence of statutory authority and where no fund has been created or preserved, a taxpayer is not entitled to the allowance of counsel fees.' [Citations.] While the actions have resulted in a saving to the city and, to that extent, a public service has been rendered, the city treasury was in no sense in the custody or control of the trial court and that court could not order any amount paid therefrom as counsel fees in either case. The same reasoning applies to the claims of each appellant with respect to reimbursement for expenses of investigation and litigation."
 [8b] Long Beach is a chartered municipal corporation. As such, it has the powers and is subject to the limitations imposed by its charter. It is without power to pay any claim save as permitted by its charter--the mode is the measure of the power.
 Section 293 of the Long Beach Charter provides the city "shall not be and is not bound by any contract, except as otherwise provided herein, unless the same is made in writing, by order of the City Council, and signed by the City Manager or by some other person in behalf of the City authorized so to do by the City Manager; provided, that the approval of the form of the contract by the City Attorney shall be endorsed thereon before the same shall be signed on behalf of the City; but the City Council, by ordinance duly adopted, may authorize the City Manager, or any commission, board or agent of the City, with the written approval of the City Manager, to bind the City without a contract in writing for the payment of supplies, labor or other valuable consideration furnished to the City of Long Beach in an amount not exceeding Thirty-five Hundred Dollars ($3500.00)." (Stats. 1951, ch. 171, *773 pp. 4632, 4636.) Petitioners' claim against Long Beach is in quasi contract for the reasonable value of the services rendered. (12 Cal.Jur.2d,  6, p. 189.)
 [10] In Dynamic Ind. Co. v. City of Long Beach, 159 Cal.App.2d 294 [323 P.2d 768], this court said (p. 298):
 "It is well settled that when a municipal charter contains an express limitation upon the mode in which the city may contract, the city is bound only by contracts executed in accordance with the charter provisions; in other words, where the statute provides the only mode by which the power to contract shall be exercised, the mode is the measure of the power. [Citations.] [11] The rule applies equally to contracts made by the city in a governmental or a proprietary function. [Citation.] [12] When the charter provision has not been complied with, the city may not be held liable in quasi contract, and it will not be estopped to deny the validity of the contract." (Emphasis added.)
 [8c] It is conceded petitioners did not have any contract with Long Beach, and no contention is made of compliance with the charter provisions. In fact, the trial court found they had no contract whatever with Long Beach, express or implied. Under the circumstances, petitioners have no valid claim against Long Beach.
 Affirmed.
 Shinn, P. J., and Ford, J., concurred.
 "Plaintiff still contends that the 1951 act of the Legislature was beyond the constitutional powers thereof; that it exceeded the State's rights and powers in its capacity as trustor under the trust theory adopted by the majority opinion; and that the subject funds remain in trust in the City for the purposes set forth in the grant to the City, viz., commerce navigation, fisheries, etc."
 "Under the Trust Theory of the Majority Opinion the State Had No Right or Power to Revoke in Part the Trust in Which the City Holds the Tidelands and the Oil Income Therefrom."
 "Argument."
 "The 1951 statute is considered by the majority opinion and referred to as a partial revocation of the trust in which the City of Long Beach, by virtue of state grants, holds the tidelands and the oil income therefrom. Plaintiff Mallon therefore assumes that the State in the passage of this legislation was acting as the trustor. We do not believe it can be successfully argued that the Legislature, in its representative capacity, was acting as the beneficiary, for the reason that"
 " '... every express trust in real property valid as such in its creation, vests the whole estate in the trustee, subject only to the execution of the trust. The beneficiaries take no estate or interest in the property, but may enforce the performance of the trust.'"
 "Civ. Code, Sec. 863."
 "The 1951 act is certainly not an attempt to enforce the trust, but is, as the majority states, an attempt to partially revoke the trust. It is clearly not an attempt to enforce the trust, which is the only power under the above cited code section, of the beneficiaries of the trust. Therefore, we are dealing with a partial revocation of a trust by the trustor by a unilateral act of the trustor."
 "But does the trustor have the power to revoke the trust involved in this proceeding? We claim not."
 "On page 11 of the majority opinion of the Court it is said"
 " '... In the absence of an express provision to the contrary, a revocation of the trust results in a reversion of the trust property to the trustor.'"
 The Court cites Section 2280 of the Civil Code.
 "It is true, of course, that Section 2280 of the Civil Code now provides in part"
 " '... Unless expressly made irrevocable by the instrument creating the trust, every voluntary trust shall be revocable by the trustor by writing filed with the trustee ...'"
 "Civ. Code, Sec. 2280."
 "But Civil Code, Section 2280, also provides in part"
 " '... trusts created prior to the date when this Act shall become a law, shall not be affected thereby.'"
 "Civ. Code, Sec. 2280."
 "Civil Code, Section 2280, in its present form became effective in 1931. Prior to 1931 Section 2280 provided, and it was the law of this State, that"
 " 'A trust cannot be revoked by the trustor after its acceptance, actual or presumed, by the trustee and beneficiaries, except by the consent of all the beneficiaries unless the declaration of trust reserves a power of revocation to the trustee. In that case the power must be strictly pursued.'"
 "See Section 2280 of the Civil Code prior to 1931."
 "In summary, in the matter now before this Court we are dealing with a trust created in 1911 by act of the Legislature, a trust, therefore, which cannot be revoked by the trustor unless an express power to revoke was contained in the trust agreement. We are, therefore, presented with a situation wherein as this Court has said, the State, by the 1951 act, revoked in part the trust. The State, in attempting to do so was acting as the trustor, because under the provisions of Section 863 of the Civil Code, a beneficiary would have no such power."
 "But the State in attempting to partially revoke the trust, is dealing with a trust created prior to 1931, viz., in 1911. Such trusts are not revocable by the trustor unless the power was reserved in the instrument creating the trust. Therefore we have the Legislature, in enacting the 1951 statute, attempting an act beyond its power as trustor, with the result that the subject funds shall continue to remain in trust in the City for the purposes set forth in the grants to the City."
 "Stratton & Taylor,"
 By Chas. C. Stratton,
 Attorneys for Plaintiff and Appellant
 Felix Mallon.""
NOTES
[fn. *]  *. This case was originally entitled "Mallon v. City of Long Beach."
[fn. 1]  1. For detailed history of the tidelands trust and litigation with respect thereto, see City of Long Beach v. Marshall, 11 Cal.2d 609 [82 P.2d 362], City of Long Beach v. Morse, 31 Cal.2d 254 [188 P.2d 17], Trickey v. City of Long Beach, 101 Cal.App.2d 871 [226 P.2d 694], Mallon v. City of Long Beach, 44 Cal.2d 199 [282 P.2d 481], Mallon v. City of Long Beach, 164 Cal.App.2d 178 [330 P.2d 423].
[fn. 2]  2. People of the State of California, et al. v. City of Long Beach, et al., Los Angeles Superior Court No. 649466.
[fn. 3]  3. Stats. 1957 (1956 Extraordinary Session) ch. 29, p. 341.
[fn. 4]  4. "Plaintiff Mallon, in answering defendants' petition for rehearing, finds himself in the anomalous position of joining in defendants' request, in that plaintiff does not accede to that part of the Court's decision which rules that the subject tideland oil revenues affected by the 1951 statute are held in a resulting trust by the City for the State.
