The county of Colusa brought this action against the county of Glenn to recover the sum of $1,622.72. The defendant demurred to the complaint, the demurrer was sustained, and the plaintiff having declined to amend, judgment thereon was rendered against the plaintiff, and this appeal is from said judgment.
The complaint alleges that the county of Glenn was formed out of a portion of the territory of Colusa county, under an act of the legislature approved March 11,1891; that in the years 1885, 1886, and 1887, the state board of equalization assessed the Northern Railway Company upon 62.81 miles of its railway then in the county' of Colusa; that the auditor of Colusa county entered the assessment made by the board of equalization upon the assessment-roll of said county in each of said years; that the amount of the taxes so assessed and due to the plaintiff for each of said years were as follows: For 1885, $4,050; for 1886, $3,969.60; and for 1887, $3,728.40; and that the whole of said sums were due, owing, and unpaid from said railway company to the plaintiff at the time the defendant county was organized; that in the year 1894 said railway company paid into the state treasury, on account of the sums so due the plaintiff, the sum of $3,526.74, and thereafter, in the month of December, 1894, $1,622.72 of said sum was paid to the county of Glenn, but that said money so paid to the defendant was and now is the property of the plaintiff; that at the time of said payment the defendant had notice and knowledge of all said facts, but has neglected and refused to pay the plaintiff said sum of $1,622.72, or any part of it. The complaint also alleges the due presentation of the claim to the board of supervisors of the defendant county, and the rejection of said claim. A second count or cause of action for money had and received is also pleaded. The demurrer was general and special. The demurrer appears to have been sustained upon the ground that an action for money had and received will not lie against a county.
*436Section 4 of the County Government Act declares that counties have power “to sue and be sued.” This is a general authority, and any restriction upon that power must be determined from the nature or character of the action brought, and by the further requirement that all claims against a county must be first presented to the board of supervisors for allowance, and that no action can be maintained without such presentation.
In Price v. County of Sacramento, 6 Cal. 254, it was said: “ The right to sue is not limited to torts, malfeasance, etc., but is given in every case of account.” In County of Los Angeles v. Los Angeles, 65 Cal. 476, it was held that the county of Los Angeles may maintain an action against the city of Los Angeles to recover the. amount of fines and forfeitures imposed and collected by the justices of the peace of the city, whether imposed for a violation of the laws of the state or of the ordinances of the city, and which had been paid into the city treasury. In People v. Chapman, 61 Cal. 262, 267, it was said: “Where money has been drawn from the treasury without authority of law it is recoverable back. Money thus obtained does not become the property of the receiver, and it is unconscientious for him to retain it.” The court below in its opinion (which we find printed in appellant's brief) quotes from Whittaker v. County of Tuolumne, 96 Cal. 101, as follows: “ The-state and its political subdivisions cannot be sued except as authorized by statute, and general language creating new remedies or prescribing procedure has never been held to authorize such actions.” This proposition is not questioned. That action was brought under section 1050 of the Code of Civil Procedure, which provides that “ an action may be brought by one person against another for the purpose of determining an adverse claim which the latter makes against the former for money or property upon an alleged obligation, and also against two or more persons for the purpose of compelling one to satisfy a debt due to the other for which plaintiff is bound as a surety.” In that case an ordi*437nance of the county imposed a license tax upon persons engaged in the business of raising, grazing, herding, and pasturing sheep. Plaintiff contended that the ordinance was void and the defendant’s claim against him for the license tax unfounded, and asked for a judgment so declaring. He had not paid the license tax nor presented any claim against the county, and said section of the code obviously did not authorize such action. If he had paid the license tax under protest and presented his claim to the board of supervisors, and upon its rejection had brought suit to recover back the money, a different case would have been presented.
The court also cited Mayrhofer v. Board of Education, 89 Cal. 110; 23 Am. St. Rep. 451. That was a case where a mechanic’s lien was sought to be enforced against a public building, and it was held that the state is not bound by the general words of a statute which would operate to trench upon its sovereign rights, injuriously affect its capacity to perform its functions, or establish a right of action against it. The distinction between that case and this is obvious. As was there said: “The constitution has itself provided, as the only means which the state has for the payment of its debts, the exercise of the sovereign power of taxation, and for each political subdivision the rule is the same.” If a mechanic’s lien could be enforced against a public building it would necessarily involve a sale of public property under execution or an order of the court, and this cannot be done.
If one county be indebted to another, whether upon an express contract or upon an implied contract, as for money had and received, we are not able to see why such an action should not be maintained. If such power does not exist under the statute authorizing counties to sue and be sued, it must result that no county could enforce a just demand against another without a special act of the legislature permitting it.
The county having power to bring such action, the question is; do the facts alleged in the complaint show that the plaintiff is entitled to the money sued for?
*438At the time these taxes were levied the entire portion of the railroad so assessed was within the county of Colusa, and said taxes were due and payable to it, and, at the time of the creation of the new county, remained unpaid, and were assets belonging to Colusa county. The act creating the county of Glenn did not provide for any apportionment of the public property, or of the debts or credits of Colusa county between it and the new county, and, in such case, the whole thereof belonged to Colusa county. (Los Angeles County v. Orange County, 97 Cal. 329; County of Tulare v. County of Kings, ante, p. 195, where this question is fully considered.)
The fact that these taxes were not paid until after the creation of the new county, gave it no right to any portion of the taxes paid by the railroad company. The legislature not having provided for a division of the assets of the old county, the new county could not have enforced against Colusa county a claim to any portion of the taxes paid by the railroad company if the whole had been received by the old county, and, that being true, the defendant, the new county, has no right to retain the portion of said tax which has come into its possession.
In the case of Kings County v. Johnson, 104 Cal. 201, it was said: “ The lien of the taxes for the year 1892 had already attached, and, unless the legislature saw fit to provide otherwise, such taxes due upon property situated in that portion of the former county of Tulare which was set off to the new county was collectible by the tax collector of Tulare.” There can be no question, therefore, that the county of Colusa had the right to collect from the railroad company the taxes which were levied upon that portion of the road which before the creation of the new county was within its limits, and Glenn county, having received a portion thereof, cannot legally retain it.
In Argenti v. San Francisco, 16 Cal. 255, it was held that if the city obtained the money by mistake, or without authority of law, it is her duty to refund it, not from *439any contract entered into by her upon the subject, but from the general obligation to do justice which bind^ all persons, whether natural or artificial, and that in these cases the city does not make any promise, but the law implies one. (See, also, Grogan v. San Francisco, 18 Cal. 590.) The county of Glenn having received the money in question without an)-- right, and not being entitled thereto, is liable, in an action for money had and received upon its implied promise, to pay the same to the county of Colusa, which was entitled thereto. Respondent cites us, however, to the case of Orange County v. Los Angeles County, 114 Cal. 390. That was an action to recover from the defendant the sum of $1,903.70, alleged to be the plaintiff’s proportion of $19,032.43, received from the state of California as repayment of money expended by Los Angeles county in providing for the support of aged persons in indigent circumstances, between June 30, 1883, and March 11, 1889, a period prior to the organization of Orange county. The act creating Orange county provided for a division of the county assets between the old and new counties upon a basis therein stated, the same to be determined by commissioners. The commissioners reported, finding an amount due from Orange county to Los Angeles county at the date fixed by the act creating the new county, and this amount was afterward paid by Orange county. At the time the commissioners made their report, neither party to said action knew of the existence of this claim against the state in favor of the county of Los Angeles, and it was, therefore, not taken into consideration by the commissioners, and the question arising in that case was whether the plaintiff could resort to the courts and maintain an action to recover its proportion of the overlooked claim as money had and received to its use. It was there held, as in other cases above cited, in the language quoted from Sedgwick County v. Bunker, 16 Kan. 498, that “where a county is divided, the rule for the division and apportionment of the debts and property between such county and detached territory be*440longs exclusively to the legislature and not to the courts; and, when the legislature has determined how the debts and property shall be divided and apportioned, the courts cannot interfere.”
The court further said: “The act prescribed the limits of each county’s rights, and the methods by which they were to be ascertained. In performing their duties the commissioners doubtless intended to make the division as required, and, if they failed to do so, the failure arose through mistake. The mistake was one, however, which, in our opinion, can be corrected by legislative action only, and not by the courts. The courts are without authority to adjust matters of this character between counties.” The question here presented, however, does not involve the question of a division of property or credits, nor of the power of the courts to interfere or correct the mistakes or oversights of commissioners appointed by authority of the legislature to make such division. The money in question belongs to the county of Colusa, and there can be no question as to its right to recover it.
As to the demurrer upon the ground of ambiguity and uncertainty, counsel for respondent contends that “in the absence of a clearer statement of facts in the complaint, it must be inferred that the state board of equalization, under the act of March 23, 1893 (Stats. 1893, p. 290), reassessed and reapportioned the assessment of the Northern Railway for the said years of 1885,1886, and 1887, and, as at that time the county of Glenn was a duly organized county of the state, the taxes so reassessed were apportioned to the counties of Glenn and Colusa according to the number of miles in the respective counties.
I do not think such an inference can be properly drawn from the complaint. The inference that there was a reassessment does not appear from its language, unless from the averment that no part of the taxes were paid until the year 1894, and were then paid to the state treasurer, since section 3669 of the Political Code re*441quires each corporation, person, or association assessed by the state board of equalization to pay to the state treasurer, upon the order of the controller, as other moneys are required to be paid into the treasury, the state and county, and city and county taxes each year levied upon the property so assessed to it, or him, by said board; and hence it appears that, whether the railroad company paid upon the original assessment or upon a reassessment, the payment would be to the state treasurer, and by him to the county. Whether there was such reassessment, and whether, if there was, it would affect the right of the plaintiff to recover in this action, are questions that are not so presented as to require decision. If there was a reassessment, and if that fact relieves the defendant from liability, it is open to the defendant to plead it.
The judgment appealed from should be reversed with directions to the court below to overrule the demurrer.
Searls, C., and Chipman, C., concurred.
For the reasons given in the foregoing opinion the judgment appealed from is reversed with directions to the court below to overrule the demurrer.
Temple, J., Henshaw, J., McFarland, J.