The defendant city has appealed from a judgment of dismissal after the sustaining of a demurrer to its amended cross-complaint, without leave to amend.
*162So far as material here, this cross-complaint alleged that in 1927 the city established an assessment district for the purpose of improving some of its streets and caused street improvement bonds to be issued and signed by the city officials, all pursuant to the Improvement Act of 1911 and the Improvement Bond Act of 1915 (Stats. 1915, p. 1441, Deering’s Gen. Laws, Act 8209); that these bonds totaled $93,833.53 and one-fifteenth of the principal amount, with interest, matured and was payable each year from 1928 to 1942; that all of the outstanding bonds are owned by the cross-defendant Irwin; that varying amounts have been paid on the bonds maturing in the years 1936 to 1941, inclusive; that $22,500 is unpaid on the interest on all of the bonds; that the city treasurer, pursuant to the provisions of the 1915 Act, established a redemption fund for the payment of these bonds; that there is now in said redemption fund the sum of $6,671.97, which was derived from the collection of assessments entered on the tax roll of Riverside County for the tax year 1941-1942 and collected by the county tax collector as an installment payment on these bonds; that after the collection of this money the county officials of the county of Riverside transmitted this money to the city treasurer of Blythe; that during the years 1928 to 1933 there was a varying delinquency in the payments made by property owners within the district on account of the assessment representing this bond issue; that during these years these same parcels of land were also delinquent in the payment of general city and county taxes; that all parcels so delinquent were sold to the State of California in accordance with the law; that prior to July 10,1939, all such parcels were deeded to the state; that on January 10, 1927, when these bonds were issued the tax laws provided, in section 3787 of the Political Code, that a deed so given conveyed to the state absolute title, free from encumbrances except any lien of taxes for municipal and irrigation district purposes; and that the deeds here issued conveyed to the state an absolute title free and clear of any lien arising from any assessment for the payment of these bonds.
It is then alleged that all lands in this assessment district are also located in the Palo Verde Irrigation District; that on January 10, 1927, the law relating to this district (Stats. 1923, p. 1067 and amendments; Deering’s Gen. Laws, Act 3880) provided that a tax deed to the district should convey absolute title, making no exception in favor of municipal or *163other taxes or assessments; that prior to July 10, 1939, deeds were executed conveying to this irrigation district all lands within this assessment district which had theretofore been sold to the irrigation district by reason of tax delinquencies; ■ that said deeds conveyed to the irrigation district an absolute title free from any lien on account of these bonds; that between 1927 and 1935, the total amount of the various taxes on each of the delinquent parcels within this assessment district was in excess of the market value of each parcel, respectively; that between 1929 and 1935 the economic situation was such that many of the property owners in this assessment district had abandoned all interest in the parcels of land owned by them; that in 1934, pursuant to the provisions of section 3897d of the Political Code, the county of Riverside and the Palo Verde Irrigation District executed an agreement approved by the state controller pursuant to which, after due proceedings, the tax collector of Riverside County executed deeds conveying to the irrigation district the respective parcels in this assessment district which had been deeded to the state; and that these deeds conveyed title to these properties to the irrigation district free and clear of any liens or assessments theretofore levied or in effect.
It is then alleged that in 1935, after receiving such deeds from the county, the irrigation district entered into numerous agreements with various persons whereby these persons agreed to buy certain parcels within the assessment district, paying one-fifth down and agreeing to pay any taxes levied by the county for the next four fiscal years; that these buyers paid to the county tax collector, as a part of the taxes assessed for the fiscal year 1941-1942, the amount of the assessment for this street improvement which was payable in the fifteenth year; that the amount of that assessment and all of the payments so made in the year 1941-1942 were paid voluntarily and without protest; that the county tax collector, after the receipt of the monies so paid for the year 1941-1942, delivered the same to the treasurer of the city of Blythe and these monies constitute the sum of $6,671.97 now in the redemption fund for these bonds; and that the city treasurer of Blythe will, unless restrained, pay to the cross-defendant Irwin this amount and any other money he may receive from the officials of the county of Riverside and collected on account of the assessments for those bonds.
It is then alleged that a controversy exists in that the city *164of Blythe contends that the deeds thus executed by the county of Riverside to the Palo "Verde Irrigation District conveyed full title to the irrigation district, free and clear of any lien for this assessment district and fully extinguished any lien for the payment of these bonds, and that since the purported assessments for the purpose of paying these bonds, which were levied in the year 1941-1942, were voluntarily paid by the taxpayers the city became legally entitled thereto as the residuary beneficiary thereof, while the cross-defendant Irwin contends that he is entitled to all of the money in this redemption fund and that the city is not entitled to any part thereof. The prayer is for a judgment determining the respective claims of the city and of Irwin to any and all money arising from the assessment for this improvement district as levied and collected for the year 1941-1942, and for an injunction enjoining the city treasurer from paying out any of said monies until the controversy is decided.
It is admitted that after these properties were resold on contract by the irrigation district the purchasers thereof paid for four years, in accordance with their contracts, the amounts levied for the payment of these bonds which were included with the county taxes, that the amount so collected during the years 1936 to 1939, inclusive, were turned over by the county tax collector to the treasurer of the city of Blythe, were placed in this redemption fund and were paid to Mr. Irwin, and that many of these purchasers were the original owners of the properties. It also appears, without dispute, that for the years 1940 and 1941 similar amounts for the payment of these bonds were levied and assessed in connection with the county taxes, were paid by the taxpayers, turned over to the redemption fund and paid to Mr. Irwin. The entire controversy here relates to similar payments assessed in connection with county taxes and paid by the taxpayers for the year 1942 when, for the first time, the city asserted its claim to the monies thus deposited in the redemption fund established by the city for the payment of these bonds.
Counsel for the city present an intricate and involved technical argument with an ability that almost makes it seem plausible. However, reduced to its essentials and in practical effect, the argument is that while the city received these improvements and signed and agreed to pay these bonds, and while under the law then existing the assessment for these bonds was a lien upon the property, this lien was entirely extinguished by legislation passed later the same year and in *165subsequent years; that the bondholder may not complain of this because when he bought the bonds he should have known that under its taxing powers the state could at any time pass laws which would have the effect of nullifying his bonds; that under legislation subsequently passed the tax sales to the state and to the irrigation district, with the subsequent transfer of the state’s interest to the irrigation district, completely extinguished any lien on account of these bonds; that after this occurred the county authorities could not legally include with the county taxes and collect the portion designed for the payment' of these bonds; that although the taxpayers were unjustly compelled to pay this amount they are not entitled to a return of the money, and have no claim or interest which need be respected, since they were “easy” and did not protect their rights by paying under protest; that although this money was illegally collected it is now in the city.’s hands; that while this money was taken from the taxpayers under the pretext that it was needed and would be used to pay the just obligation for these improvements, and while it has already been placed in a fund created for the redemption of these bonds in accordance with the command of the statute, it is not “properly” in that fund; that since the money has improperly been placed in this redemption fund in charge of a city official, which fund can only be used to pay these bonds until they are fully paid, the city has the right and duty to withdraw it from that fund; and that since there is no law to protect the rightful owners of the money, it follows that the city has a right, with which a court must not interfere, to take and use this money for its general fund.
Incidentally, it is urged that this court overrule all statutory and judicial laws and rules upholding the doctrine of parity as between different tax liens, and that it promulgate a new and practical “philosophy of governmental survival” by establishing, • once and for all, that some one tax lien is paramount and extinguishes all others upon failure of redemption within the time allowed, regardless of what laws were in force at any particular time. While this course might, as counsel state, remove many of the «perplexities, inconsistencies and uncertainties which now exist in this field it is subject to the more or less important (according to the point of view) objections that it would ignore all constitutional questions and all vested contractual rights, that it would have the practical effect of nullifying all statutes inviting and *166providing for the issuance of improvement bonds, and that it would make it certain that no one would ever again be so foolish as to purchase or accept a bond of that nature.
The very statement of these contentions furnishes a most convincing argument that some better solution of the problem before us should be found, and suggests that some principle should here be applied other than the primitive rule that “he may take who has the power and he shall keep who can.”
The basic question here is as to who is entitled to this money which has been actually paid by these taxpayers and which has actually been placed in this redemption fund. The appellant’s theory is based upon the main premise that the balance or surplus of a public fund, when it is subject to no other claim, becomes the property of the public body administering the fund. It is then contended that this situation exists here because the taxpayers have no claim to this money since they paid their taxes voluntarily, and because the bondholder has no claim thereto since any assessment lien was extinguished by the tax sales. Although the question as to whether this assessment lien was extinguished by these tax sales may be an interesting one it is not controlling, under the facts of this case, and need not be here decided. Assuming, but by no means holding, that the lien here was thus extinguished it does not follow that the bondholder is not entitled to the money which has been collected and paid in this manner and which has thus come into this special fund.
The appellant city could not and would not have obtained possession of this money except for the existing proceedings taken under the Improvement Bond Act, and the attempt of the officials to carry out its provisions. The city and the county officers acted under and because of that proceeding and the money was paid and received because thereof. Under the provisions of that act all monies assessed and collected from the landowners and placed in this redemption fund were to be paid to the bondholders, and under the provisions of the act there could be no surplus in this fund until the bonds were paid in full.
Regardless of whether or not the lien of this assessment had been extinguished there was here a just debt which has never been extinguished. A certain class of people, the owners of these lands, were obligated to pay this debt. The city was also obligated under certain conditions and if the landowners failed to pay. The assessment lien was but one of the means of enforcing payment of the debt, and whether or not a lien on *167the land still remained in force a levy of taxes was actually made for the purpose of paying the debt. No attack was made upon the tax levy so made. The amounts were thereupon paid and turned over by the county authorities to the city and placed in the fund established by it for the purpose of paying the debt. The city acquiesced and participated in the proceedings for this purpose and applied the proceeds in payment of the bonds for a period of six years after the land was resold by the irrigation district. In the final year the city permitted the same things to be done, again accepted the money and it was placed in the redemption fund maintained as required by the statute. Not only are all of the equities in favor of compelling the city to use this money for the purpose for which it was collected and paid, all parties having acted in good faith up to that time, but there seems to be no hard and fast rule of law which compels something to the contrary to be done. Moreover, the Improvement Bond Act of 1915 (§12) requires the city, under circumstances which existed here, to become the real purchaser at the delinquent sales and to pay and transfer into the redemption fund the amounts of the delinquent assessment. This was never done and the city should hot be allowed to take advantage of its own wrong and its own failure to comply with the law.
It makes little difference whether we consider the city a trustee here with respect to its receipt of this money, under these conditions, or whether it is considered merely as an obligation to be implied from an existing contractual relationship. In any event, under the unusual circumstances here appearing, it seems clear that this money having been paid and collected, transferred to the city and placed in this special fund, all for a distinct purpose under a valid law and to meet a just obligation, should be used for the purpose for which it was collected by the authorities and paid by the taxpayers. It seems even more clear that if any other result is conceivable the city is not now entitled to take and use this money for other purposes, as being a fund which is subject to no other claim. Under no theory could it be held that the city is entitled to take this money for general purposes.
The appellant further contends that since this was an action for declaratory relief it could not be dismissed on the sustaining of a demurrer, citing Maguire v. Hibernia 8. & L. Soc., 23 Cal.2d 719 [146 P.2d 673, 151 A.L.R. 1062], While the amended cross-complaint was entitled as one for declaratory relief the prayer is for a judgment determining the *168respective claims of certain parties to the monies derived from the assessments referred to and necessarily placed in a special fund, and for an injunction against the city treasurer. In practical effect, this is not a declaratory action but one to obtain certain specific money and to enjoin the city treasurer from paying it to someone else. Moreover, it appears that the city could not recover in any event and the case relied upon is not controlling. (Vincent v. Security-First Nat. Bk., 67 Cal.App.2d 602 [155 P.2d 63] ; Simpson v. Security First Nat. Bank, 71 Cal.App.2d 154 [162 P.2d 494]; Bogardus v. Santa Ana W. G. Assn., 41 Cal.App.2d 939 [108 P.2d 52].)
The judgment appealed from is affirmed.
Marks, J., and Griffin, J., concurred.