delivered the opinion of the Court.
The questions presented by this appeal are of very great interest and importance; more on account of the character of the parties, and the large amount of money involved, than by reason of any intrinsic difficulty in the questions themselves. These depend for their solution upon plain and íamiliár principles of law, which are not affected in their application either by the amount in controversy or the dignity and power of the parties litigant.
The action is indebitatus assumpsit, instituted by the appellant against the appellee on the 6th day of May, 1870.
The declaration contains a count “ for money had and received by the defendant for the use of the plaintiff.”
In answer to the defendant’s demand for a bill of particulars, the plaintiff’s claim was stated to be “ for five hundred *360thousand dollars, ($500,000,) being the one-fifth part of the whole amount of moneys received .by the defendant for the transportation of passengers upon the "Washington branch of the Baltimore and Ohio Railroad, from the 1st day of January, 1860, to the 1st day of January, 1870; which said sum of $500,000 was received by the defendant for the use of the plaintiff, and was due and in arrears to the plaintiff at the time of the institution of this action.”
The defendants plead “that they never were indebted as alleged by the plaintiff’,” and also filed a plea of set-off.
To this second plea there was a demurrer, which was sustained by the Court below. Issue being joined on the first plea, a verdict was rendered in favor of the defendant under the instructions of the Superior Court, and from the judgment thereon this appeal has been taken.
It appeal's from the bill of exceptions that the plaintiff offered in evidence the Acts of the General Assembly of Maryland, containing the charter of tl;e defendant, all the Acts of Assembly relating to the construction of a railroad between the cities of Washington and Baltimore, and to the payment to the plaintiff by the defendant of one-fifth part of the whole amount which may be received by it from the transportation of passengers on the said branch road, and all other Acts applicable in the premises; that these A'cts were accepted, by the defendant, and the branch road completed and put in operation under them in the year 1835. Also offered in evidence statements made from the books of the defendant, showing the whole amount of money so received by the defendant for the transportation of passengers, and the portion thereof paid to the State on account of said one-fifth, during the period covered by the bill of particulars, showing an apparent balance unpaid on the 1st day of January, 1870, of $316,871.43. Evidence was then offered showing that the fare charged and received from passengers on the branch road during the Avhole period of time covered by the bill of particulars, Avas $1.50 for each passenger betAveen- Washington *361and Baltimore, and at the same rate for shorter distances; and that from the time of the completion of the branch road down to the 1st day of January, 1868, the defendant had annually rendered an account purporting to show the gross amount received for the transportation of passengers, and the State’s proportion thereof; and had made semi-annual payments in January and July in each year on account of the same, to the Treasurer of Maryland, down to the 1st day of July, 1868.
After the testimony on the part of the plaintiff had been closed, two prayers were offered on the part of the defendant, stating substantially:
1st. That the several Acts of Assembly, so far as they provide for the payment by the defendant to the treasurer for the use of the State, of one-fifth of the money received for the transportation of passengers on the branch road, are unconstitutional, because in conflict with the Constitution of the United States.
2d. That the defendants are not estopped from denying the constitutionality of said Acts, by reason of their having charged and received $1.50 for the transportation of each passenger for the whole distance over the branch road, and accounted with and paid to the treasurer one-fifth of the gross receipts from passengers on said road up to the 30th day of June, 1868, and that the plaintiff' was not entitled to recover.
These prayers were granted by the Superior Court. It thus appears that the defence to the action rests entirely upon the alleged ground that the several Acts of Assembly, whereby the obligation was assumed by the company to pay to the State Treasurer, the one-fifth of the gross amount received from the passenger fare on the railroad, are inoperative, because in conflict with the Constitution of the United Slates.
The argument urged in suppoit of this position is that the operation and effect of such a contract between the company and the State is to impose a capitation tax upon passengers, *362to the amount of one-fifth of the railroad fare charged by the company; which, to that extent, is a tax upon the right of citizens to travel through the State, and is a violation of the Constitutional rights of the citizen under the decision of the Supreme Court in Crandall vs. Nevada, 6 Wallace, 35.
This Constitutional question has been fully argued, and has received the consideration by this Court which its importance demands; and .before concluding this opinion we propose to explain the grounds upon which we think the contract between the State and .the railroad company is free from all Constitutional objection.
But before taking up that question it is proper to say that in our judgment the rights of the parties in the present suit do not, by any means, necessarily depend on its solution.
If, as we think, the legislation of the State in question is constitutional and valid, the defence relied on by the appellee fails, and the judgment must of course be reversed. But if, for the purposes of the present case, it be conceded that the defendant’s position upon the Constitutional question is correct, that the effect of the Act of 1832, and its supplements, is to impose upon passengers a capitation tax, collected from them by the railroad company for the use of the State, above and beyond the mere charge for transportation, (and upon that ground alone is it contended that the one-fifth of the money paid by the passengers is an unconstitutional tax;) and if in point of fact a sum of money so collected has actually been received by the company, then it is money collected not for itself, but for the use of the State, and the question arises whether it is competent for the company to set up as a defence-to the action brought by the State, for the recovery of the money so received, that the Acts of Assembly under which it was collected were unconstitutional. That is the question raised by the prayers offered °by the plaintiff, which were refused by the Superior Court. '
They assume for the purposes of the present case that the money collected from passengers for the use of the State was *363an unconstitutional exaction from them, as alleged by the defendant, and yet assert the proposition that this furnishes no defence in the present suit; and that the plaintiff is entitled to recover one-fifth of the gross sum actually received for the transportation of passengers, and not already paid to the plaintiff “ without regard to any question of conflict between the Acts of Assembly and the Constitution of the United States.” Or to state the proposition more plainly, that the railroad company having collected certain moneys from passengers for the use of the State, cannot be allowed to retain the money, and refuse to pay it to the party to whom it belongs, on the plea that the persons from whom it was collected were not legally hound to pay it. In our opinion this proposition is a sound one, consonant with the plainest principles of reason and justice, and supported by an unbroken current of decisions.
This action is indebitatus assumpsit, upon the implied promise of the defendant to pay to the State the money collected for its use: the receipt of the money for the plaintiff’s use being the ground of the action from Avhieh the implied promise springs.
In such case the question of the validity of the laAV under which the money was collected cannot properly arise. That is a distinct and collateral question which might have been raised by the persons from whom the money was collected, but cannot be successfully urged by the railroad company in answer to the suit of the State. Of course we are not to be understood as maintaining the proposition, that the legal rights of parties are dependent upon the mere form of action adopted, or that it is competent by resorting to an action upon an implied assumpsit, to enforce a contract, which could not be enforced by an action brought on the express contract. Such an evasion is not tolerated by the law, Avhieh does not alloAA^ that to be done indirectly Avhieh cannot be done directly. But if the foundation of the suit be something collateral to the illegal contract or transaction, and the plaintiff is not *364obliged to resort to this in order to maintain the suit, or to derive any aid from it, then the illegality of the original transaction is not a defence to the suit.
There is a broad and well recognized distinction between suits to enforce illegal contracts, and those asserting title to money arising from them. We shall presently cite some authorities in support of this general proposition. But first let us examine more particularly the nature of the arrangement between the State and the railroad company, and see in what its supposed unconstitutionality is alleged to consist. There is no pretence of any intentional violation of the Constitution, nor is there any express provision of that instrument to which the State laws are repugnant, it is said they are in conflict with its general scope and spirit. This is then not a case of iurpis contractus.
The defence here urged is, that under its contract with the State, the company has added the moneys for the State’s account, to the fares it collected for itself, and thus collected from passengers a capitation tax for the use of the State, which could not be constitutionally imposed. Now if this be so, the illegality of the transaction consisted entirely in the supposed unconstitutional exaction from the passengers; they were the only parties whose constitutional rights were invaded; they having waived the question of legality and paid the money voluntarily to the railroad company, cannot recover it back, This position is settled by numerous authorities, among them we cite Lefferman vs. Mayor, &c., 4 Gill, 425; Morris vs. Mayor, &c., 5 Gill, 248; Balt. & Sus. R. R. Co. vs. Faunce, 6 Gill, 76 ; Lester vs. Mayor, &c., 29 Md., 415. That a party may waive' a constitutional provision which applies in his favor, was decided in Baker vs. Braman, 6 Hill, 48, cited and approved by the Supreme Court in the recent ease of the Philadelphia, Wilmington & Baltimore R. R. Co. vs. Trimble, 10 Wallace, 382.
The question then is, shall the defendant be allowed to retain the money as against the claim of the State?
*365It is certainly true that the Courts of justice do not lend their aid in the enforcement of illegal or unconstitutional contracts. But in the aspect in which the defence in this case is presented, the contract between the State and the company, if obnoxious at all to objection on constitutional ground, can only be so in respect to the collection from passengers of the one-fifth of the fare for the use of the State. It is perfectly clear that when the money lias actually been collected by the company, that part of the transaction which is supposed to be unconstitutional has been completed; the illegal contract lias been performed and is at an end, and in no manner enters into the question which subsequently arises between the railroad company and the State, as to the duty and obligation of the company to pay over the money to the State for whose use it was collected, and to which it belongs. To that part of the company’s contract there remains no constitutional objection, and it is no answer to the suit of the State, instituted to inforce its payment by the company, that it was an unconstitutional tax upon the passengers.
A point very analogus to this was expressly decided in Waters vs. The State, 1 Gill, 302. It was there held, that a collector who has received State taxes cannot set up the unconstitutionality of the tax as a defence to the State’s recovery. “Having admitted,” says Judge Aecher, p. 308, “the receipt of the money, the collector, who is in the light of an agent of the State, could not be heard to urge in his defence to a suit, that the money he had received was on account of taxes which the Legislature had no constitutional power to impose.”
In Paley on Agency, 28 L. Lib., 62, the general principle is thus clearly and correctly stated:
“ If money has been actually paid to an agent for the use of his principal, the legality of the transaction, of which it is the fruit, does not affect the right of the principal to recover it out of the agent’s hands. For though the law would not have assisted the principal, by enforcing the recovery of it *366from the party by whom it was paid, because it is the policy of the law not to aid the completion of an illegal contract, yet when that contract is at an end, the agent, whose liability arises solely from having received the money for another’s use, can have no pretence to retain it.”
This doctrine is fully sustained by a number of adjudged cases, some of which are cited by the author. In Tenant vs. Elliott, 1 B. & P., 3, the defendant being a broker, effected an illegal insurance for the plaintiff on his ship. The ship being lost, the underwriters paid the amount of the insurance to the defendant, who, without any intimation from them to retain the money, refused to pay it over to the plaintiff. In deciding the case, Btjller, Justice, said: “ Is the man who has paid over money to another’s use to dispute the legality of the original consideration ? Having once waived the legality, the money shall never come back into his hands again, can the defendant then in conscience keep the money so paid ? For what purpose shall he retain it ? To whom is he to pay it over but to the plaintiff?” Chief Justice Eyre said, in the same case: “ The defendant is not like a stakeholder. The question is, whether he who has received money to another’s use, on an illegal contract, can be allowed to retain it, and that not even at the desire of those w'ho paid it to him ? I think he cannot.” In Farmer vs. Russell, in the same volume, 295, the same principle was decided, and was recognized by Lord Chancellor Cottenham in Sharp vs. Taylor, 2 Phillips’ Chan. Rep., 817, 818, and by Sir Wm. Grant, M. R., in Thompson vs. Thompson, 7 Vesey, 473.
These cases have been cited and approved, and the same ' principle has been followed by the Supreme Court in McBlair vs. Gibbes, 17 How., 236, 237, and in Brooks vs. Martin, 2 Wallace, 70. In the ease last cited, the bill was filed by one partner to recover his share of the profits of a partnership entered into for the purpose of buying soldiers’ claims in violation of an Act of Congress. The Court say, (p. 79,) the traffic in which the firm was engaged was illegal; and yet the *367bill was maintained upon the ground that the illegal contract had been completed and was at an end, and the suit was brought to recover the plaintiff’s share of realized profits. The opinion of Lord Cottenham in Sharp vs. Taylor, 2 Ph. Ch., is quoted at great length, citing the cases of Tenant vs. Elliott, Farmer vs. Russell, and Thompson vs. Thompson, as showing the difference between enforcing illegal contracts and asserting title to money which has arisen from them. The Court then say, (p. 81,) “ These cases are all reviewed in the opinion of this Court in McBlair vs. Gibbes, 17 Howard, 232, and the language here quoted from the principal case is there referred to with approbation. We are quite satisfied the doctrine thus announced is sound, and is directly applicable to the case before us.”
We need only add that the principles upon which those cases rest, and which have thus received the unqualified sanction of the Supreme Court, appear to us to be consonant with reason and justice, and fully sustain the position taken by the appellant on the question now under consideration.
In respect to the one-fifth of the money actually received from passengers by the defendant, which this suit was instituted to recover, as we have before said, the right of the plaintiff to recover does not depend upon the question of the constitutionality of the Acts of Assembly; for assuming the appellee’s views upon that question to be correct, this furnishes no defence to the present suit.
For these reasons, we are of opinion the prayers of the appellant ought to have been granted.
In the view we have taken of this case, as it is presented by the pleading and upon the prayers of the plaintiff, it may, perhaps, bo unnecessary to express any opinion upon the constitutional question ; but as that is presented by the defendant’s prayers, has been fully argued and has received our careful consideration, and as our silence on a matter of so much interest and importance might lead to some misapprehension with respect to the opinion entertained by this Court, *368we consider it proper to state some of the reasons which have led us to the conclusion that the legislation of the State now called in question, is nowise in conflict with the Constitution of the United States.
In the preceding part of this opinion, we have treated the case as the plaintiff' has chosen to present it, assuming the hypothesis of the defendant’s prayers to be correct, and have shown that it does not affect the right of the plaintiff to recover in the present suit. But in our judgment this hypothesis is erroneous, and rests upon a misconstruction of the Acts of Assembly. It seems to us to be a great error to suppose that the arrangement between the State and the railroad company", under which the branch road was constructed and went into operation, and the company has enjoyed its franchise; whereby the company for valid and sufficient considerations contracted to pay the State a portion of its gross receipts from the transportation of passengers, can be fairly construed as imposing an unconstitutional tax upon passengers within the decision of the Supreme Court in Crandall vs. State of Nevada, 6 Wallace, 35.
That case arose in this way. The Legislature of Nevada, in 1865, enacted “ that there should be levied and collected a capitation tax of one dollar upon every person leaving the State by any railroad, stage-coach or other vehicle engaged or employed in the business 'of transporting passengers for hire.” “The proprietors, owners and corporators so engaged were required to pay the tax of one dollar for each and every person so conveyed or transported from the State. Eor the purpose of collecting the tax, another section required' from persons engaged in such business, or their agents, a report every month, under oath, of the number of passengers so transported, and the payment of the tax to the sheriff or other proper officer.” Crandall, the agent of a stage company, was indicted for refusal to make the required report and pay the tax. He plead that the law was unconstitutional and. void; his plea being overruled by the State Court, the *369case was carried on writ of error to the Supreme Court, where the judgment below was reversed — all the Judges being of opinion that the law of Nevada was unconstitutional; two of them (Chief Justice Chase and Mr. Justice Clifford) considered that the State law interfered with the regulation of commerce between the States. The majority of the Court placed its decision upon the ground that the Nevada statute taxed every traveller for the privilege of leaving the State by any of the ordinary modes of transit, and that as the right to tax involved the right practically to prohibit, the law was an obstruction, and might, if such a power could be exercised by the State, be made a prohibition of the right of the citizen to unobstructed access to all parts of our common country, and of the right of the Federal Government to secure the presence of the citizen, in any part of the Union to aid in its civil administration, or to support it in war.
Such a power was held to be inconsistent with the implied powers of the Federal Government and the rights of the citizen under the Constitution of the United States, and therefore could not be constitutionally exercised by a State.
The language used by the late Chief Justice Taney, in his dissenting opinion in the Passenger Cases, 7 Howard, 492, is cited in the opinion of the Court as stating the ground upon which the decision of the Nevada case was placed, as follows : “A tax imposed by a State for entering its territories or harbors is inconsistent with the rights which belong to the citizens of other States as members of the Union, and with the object which that Union was intended to attain. Such a power in the States could produce nothing but discord and mutual irritation, and they very clearly do not possess it.”
It is very clear that the case of Crandall vs. Nevada fell directly within this plain and salutary rule. The statute there under consideration imposed in terms a “capitation tax” upon every individual who left the State by a public conveyance. It was held to be a tax upon the right of the citizen to pass through or leave the State, and involved .the power of pro*370hibifcing the enjoyment of such right altogether. Such a power, it was decided, could not be constitutionally exercised by a State, no matter what terms the statute might employ. The Court say: “We should be very reluctant to admit that any form of words which had the effect to compel every person travelling through the country by the common and usual modes of public-conveyance to pay a specific sum to the State, ■was not a tax upon the right thus exercised.” Such was the decision of the Supreme Court in Crandall vs. Nevada, which being the decision of the Court of last resort, is a binding and conclusive authority upon the question.
But in our judgment there is no analogy between that case and the one before us — not the least similarity between the Nevada statute and the Acts of Assembly of Maryland which are here assailed. These do not, like the Nevada law, in terms or in fact “ impose a tax for the use of the State, upon the right of the citizens to travel, at the usual and agreed rate of fare, over existing, and established routes, and in existing and established conveyances.” The Maryland Laws were passed in order to create new and improved modes of conveyance; to give to the traveller better, cheaper and more rapid means of transportation than before existed. It is a perversion of the intention of the Legislature, and contrary to the whole scope and meaning of the laws to construe them as imposing a tax upon travellers or “an obstruction upon the right of locomotion. The whole argument of the appellee, by which it is sought to bring this case within the principle decided in Crandall vs. Nevada, is that the effect of the State’s reservation is to increase the fare of the passenger upon the railroad; and thus it operates indirectly as a tax upon him; if this be so, it is no infringement of his constitutional rights. Such would be the effect of any State law imposing taxes upon the property of the company for the support of Government, as thereby the pecuniary burdens and expenses of the company would bo augmented, and its rates of charges for transportation consequently increased. 11
*371The same may he said of any Act of incorporation of a railroad company, ■whereby a bonus is reserved to the State for granting the franchise; such a bonus might be a sum of money payable by the company in gross, or in instalments, or payable out of the receipts of the company for transportation of passengers or merchandise, Gordon vs. Appeal Tax Court, 3 Howard, 145, and yet it cannot be for a moment supposed that the State laws, requiring the payment of such taxes or bonus by the corporation would be repugnant to the Constitution of the United States.
In construing legislative contracts the same rule applies as in the construction of other contracts. As was said by the Supreme Court in the case of the Binghampton Bridge, 3 Wallace, 74, “ they are to be construed to accomplish the intention of the parties. * * * * It is not the duty of the Court by legal subtlety to overthrow a contract; but rather to uphold it and give it effect, and no strained or artificial rule of construction is to be applied to any part of it.” This rule applies with peculiar force when the contract has assumed the form of a law. In dealing with an Act of Assembly, which is alleged to be inoperative by reason of want of power in the Legislature to pass it, for supposed repugnancy to the Constitution of the State or of the United States, every intendment ought to be made in support of the law, and it is not to be declared invalid except for the plainest and most conclusive reasons.
Applying these rules of construction to these Acts of Assembly, what is their plain meaning and intent? They confer upon the defendant the franchise and power to construct the branch railroad and to collect tolls for the transportation of passengers and merchandise; the State in order to aid in the accomplishment of the work, by the Act of 1832, ch. 175, relinquished the privilege and option which had been retained under the antecedent Acts, and engaged to advance a half million of dollars, one-third of the estimated cost of the work, and to become a stockholder to that amount. The *372company for these considerations stipulated to pay to the State a certain portion (one-fifth) of its gross receipts from passenger, transportation; and at the same time the State limited and prescribed the maximum rates of toll to be charged by the company. The Act of 1832 contained a proviso, that the one-fifth of the passenger fare for the whole distance, should not be less than twenty-five cents; or in other words, that the fare for a single passenger should not be less than $1.25. By subsequent Acts this provision was repealed; and by the Act of 1852, ch. 328, which is still in force, the company is authorized to regulate the tolls to be paid for the transportation of passengers, in their discretion, not exceeding the maximum already fixed by law.
These Acts when accepted by the defendant, became a contract between the company and the State. It was entered into in good faith and for a valuable and sufficient consideration. It certainly did not enter into the imagination of the parties that it was in any respect repugnant to the Constitution. It has been acquiesced in, and faithfully observed by the company for more than thirty years. This Court is now called on to declare it unconstitutional and void, because it is •.alleged to be a law imposing a capitation tax upon passengers. •Such was not the purpose of the Legislature, nor is such intention to be found in the provisions of the law.
■ It seems very clear to us that the money reserved by the .State is a tax upon the corporation not upon the passengers, ¡and it is therefore not subject to any constitutional objection. The power of the State to impose such a tax or burden upon -the company, with its consent, is too clear to be questioned. The corporation was created by the laws of the State, and .-except so far as exempted by its charter, it is subject to the jurisdiction .and power of the State. In the case of McCullough vs. The State, 4 Wheaton, 429, Chief Justice Marshall, in speaking of the power of taxation by a State, says: “It ■is ¡obvious that it is an incident of sovereignty, and is coextensive with that to which it is incident. * * * All subjects *373over wliioh the sovereign power of a State extends are objects of taxation; but those over which it does not extend are upon the soundest principles exempt from taxation. * * * The sovereignty of a State extends to everything which exists by its own authority, or is introduced by its permission.”
This is the distinct and well-defined power to which we are to refer the legislation of the State now in question. Is it a tax upon the corporation ? This question is answered by the terms of the law, and its whole tenor and scope. The money is payable by the company out of its own receipts. The passenger fare received by the company is simply the toll for transportation collected by virtue of its powers under the charter, these are regulated in its discretion, subject only to the limitation prescribed by the Acts of Assembly, and which the State had the undoubted • power to prescribe. Under the law it is bound to render accounts of its gross revenue from passenger transportation, and to pay to the State a sum equivalent to one-fifth of the whole amount so received. The sums payable to the State are to be ascertained by reference to the amount of gross receipts or income of the company from passenger transportation, this furnishes the standard or basis of the computation. Such is our construction of the Acts of Assembly; so construed, they are wholly unlike the statute of Nevada considered in Crandall’s Case in 6 Wallace.
They may be assimilated to the provisions in the Act of Congress, approved June 30th, 1864, ch. 173, section 103, which imposes a tax, upon railroad companies and other carriers, of a certain per centum upon their gross receipts. By the same process of reasoning adopted by the appellee in construing the Maryland Laws, these provisions of the Act of Congress would be construed as levying a capitation tax on passengers, and therefore unconstitutional, for Congress can no more impose such a-tax constitutionally, than can a State Legislature, and it is besides prohibited by the Constitution from imposing direct taxes upon the citizen. *374But the Act of Congress referred to is properly construed, as imposing a tax upon the carrier, not upon the passengers ; and we think the same construction ought to be placed upon the Acts of Assembly before us.
In our opinion they are not in conflict with the Constitution of the United States, and therefore the Superior Court erred in granting the prayers of the appellee.
Upon the question raised by the demurrer to the second plea, we concur in the ruling of the Superior Court. In actions instituted by the State, it is well settled that no right of set-off exists, unless in cases where such defence is expressly allowed by statute, for the reason that the State being sovereign is not liable to be sued by an individual or corporation.
The right to sue the State was given by the Act of 1786, ch. 53, but this was afterwards repealed and the right taken away.
This immunity belongs to the State by reason of her prerogative as a sovereign, and on grounds of public policy. Parties having claims or demands against her, must present them through another department of the Government — the Legislature — and cannot assert them by suit in the Courts. For the same reason a right of set-off against the State does not exist. This is in the natui’e of a cross-suit, the object of which is to prevent circuity of action, and it does not exist where the subject matter of the set-off could not form the ground of an independent suit. It is a remedy conferred by statutes, which do not apply to the State, as she is not expressly embraced by their provisions. For these positions we refer to Milburn vs. Guyther, 8 Gill, 93-95; Plater vs. Scott, 6 G. & J., 121 ; State vs. Bank of Md., 6 G. & J., 225-227; Tiernan vs. Rescaniere, 10 G. & J., 225; State vs. Milburn, 9 Gill, 118 ; United States vs. Hoar, 2 Mason, 312.
It is very clear that the subject matter of defence alleged in the plea cannot constitute a ground for recoupment, because the alleged cross-claim does not arise in any manner out of the contract or transaction which constitutes the cause of *375action, but is an entirely separate and distinct claim, having no connection therewith. Carroll’s Adm’r vs. Quynn. 13 Md., 390.
(Decided 30th May, 1871.)It could only be relied on, if at all, under a plea of set-off, which, as we have said, is not a good plea in this suit, and the demurrer was properly sustained. Although it does not necessarily arise on this appeal, we have considered it proper to express our opinion upon this question, because it is presented upon the record, and in case of another trial might be again raised.
Judgment reversed and new trial ordered.
Ai/vey, J., delivered the following opinion, in which Guasón, J., concurred, recognising the right of the State to recover, but not in the present form of action:
The right of the State to recover of the railroad company the tax sued for in the present action is maintained, according to the opinion of the majority of this Court, upon the assumption (which is, for the purposes of this suit, a virtual concession) of the illegality of the tax in question; and as I do not perceive the propriety of such an assumption to maintain the right of the State, I must dissent from this mode of disposing of the case; although I entirely concur with the rest of the Court in the conclusion that the State is entitled to recover, and that the judgment appealed from should be reversed.
I shall, therefore, in a very brief way, and without at all going into au extended argument upon the subject, state my views of the two questions presented by the record before us.
And first, as to the validity of the tax sought to be recovered in this action.
This question is directly presented by the appellee’s prayers, which were granted, and in the argument of it in this Court, the great effort in behalf of the company has been to show *376that the tax in question is of the character of that declared to be unconstitutional and void, in the case of Crandall vs. the State of Nevada, 6 Wall., 35. But, with all proper respect for the ability and apparent sincere conviction of the learned counsel who argued for the company, I have been utterly unable to discover the supposed resemblance of the two cases. That reported in 6 Wallace was the case of a specific tax levied on the traveller for the privilege of leaving the State of Nevada by any of the usual and ordinary modes of travel, the question being, as stated by the Supreme Court, the right of a State to levy a, tax upon persons residing in the State who might wish to get out of it, and upon persons not residing in it who might have occasion to pass through it. The State law, determined to be in conflict with the Constitution of the United States in that case, provided that there should be levied and collected a capitation tax, as such by express denomination, of $1 upon every person leaving the State by any railroad, stage-coach or other vehicle engaged or employed in the business of transporting passengers for hire, to be collected and paid over to the State by the carriers. But the case at bar is in all material respects different. The law here involved certainly does not in terms impose any specific tax upon the passenger for the right of transit, as in the Nevada case; nor do I think that any ingenuity is capable of so construing its terms as fairly to put the State in the position of imposing a direct tax upon the right of travel, upon the theory that though it be collected as fare, it becomes a direct tax upon the passengers by simply making the apportionment as between the State and the railroad company. On the contrary, the obvious reading of the law is, that this is a special tax, founded on compact between the State and the railroad company, assessed not on the passenger, but on one portion of the company’s income and profit. The company is required to, pay into the treasury of the State the “ one-fifth of the whole amount which may be received ” for transporting passengers over its road ; or, in other words, twenty per cent. *377of the gross receipts from one particular branch of its business ; and reference is made to the passenger only by way of limiting and regulating the amount of fare that the company is authorized to exact, not on account of the State, but on that of the company. It is certainly competent to the State to tax the entire gross profits of the company, and, if so, it is equally competent to tax any particular part of them. The tax, then, according to my view, is imposed directly upon the profits of the railroad company, and not upon the passenger, as contended by the counsel of the company; and the passenger is not otherwise affected by such tax than he would be by the same amount imposed as a tax upon the bed of the road or its rolling stock. It may be tree, and no doubt is the case, that the rates of fare fixed by the company are somewhat enhanced by the existence of this continuing demand of the State, but it is only as any other tax or demand upon the company would be calculated to produce such enhancement. The company would naturally so regulate its rates of fare as to enable it to discharge its obligations, and to make profit for its shareholders besides. But, as the law now stands, and has stood since the Act of 1852, chapter 328, the company is only restrained from charging as fare more than the maximum rate prescribed by the Act of 1832, chapter 175. Under that sum, it has full and complete discretion over the rates of fare, .and the State is only entitled to the one-fifth, or twenty per cent, of the smallest amount that the company may think proper to exact from the passenger as fare. And if the law imposing the tax now sued for were to he declared void, it by no means follows, as a necessary consequence, that the railroad company would lessen its rate of fare; no one can confidently predict such a result; and it is certainly true, that there is no power to compel it to be done. And this being so, what better test could be furnished of the nature of the tax in question, and as to the party upon whom it is imposed ? Indeed, as I understand the counsel for the company, it is not only conceded that the fare heretofore charged was legal, *378but it is insisted upon as the right of the company, in its discretion, to charge and receive of the passenger any rate of fare, not exceeding the maximum rate allowed by the law to be charged; the illegality, therefore, supposed to exist, consisting simply in the claim of the State to share in the proceeds. Thus, in effect, at once conceding that the tax is not levied upon the passenger, but upon the income or gross profits of the company, derived from the transportation of passengers. And this tax, thus levied, the company agreed to pay to the State for most material aids and benefits conferred, and for the surrender by the Act of 1832, chapter 175, of important and valuable rights held by the State under the Acts of 1830 and 1831, recited in the Act of 1832, and without which the road could not have been made; certainly not at the time it was made.
Now seeing that this tax is not a capitation tax, or in any proper sense a direct tax upon the passenger for the right of transit, can it be successfully maintained that the law imposing it is in conflict with the Constitution of the United States, simply because the passenger may be incidentally affected by such tax, in the price of the fare he may be required to pay to the railroad company ?
To maintain the affirmative of this proposition, would require that the Courts should, in all cases, inquire as to the elements upon which the rates of fare of the numerous railroad companies of the country are based, and if it be found that such rates have any reference whatever to the State taxes that may be imposed upon the company, and whereby the fare of the passenger is at all enhanced, such taxes would, therefore, have to be declared void. If such. were to be the declared law, it would certainly afford an easy device by which all the railroads of the country could obtain exemption from State taxation. We may be assured, however, with reasonable certainty, that the principle of the Nevada case will never be carried to such an extent.
*379I shall add nothing more upon this question, except to refer to the case of The Commonwealth vs. The Railroads, known as the Tonnage Tax Cases, in 62 Penn. St. Rep., 286, in which there is a well-reasoned opinion of the Supreme Court of Pennsylvania, upon a question of a kindred nature to that presented in this case. Much of the reasoning in that case applies here, and the most material parts of the argument advanced for the company in this case will be found to be well answered by that opinion.
With these views, I fully concur in opinion with the other members of the Court, that there was error committed by the Court below, in granting the prayers offered on the part of the appellee — the railroad company.
The next question is, has the State the right to recover this tax of the railroad company in an action simply for money had and received ? and it is in reference to this part of the case that I differ from the rest of the Court.
Assuming the tax to be valid, and that it is levied upon the profits and income of the company, I think it clear that the action for money had and received is inapplicable, and cannot be maintained. I take it to be free from doubt, that the money recoverable in this form of action should have been originally received by the defendant to the plaintiff’s use, or, at the time of the action brought, it should have belonged to the plaintiff, and not to the defendant in his own right. That is not the case here. If I am right in supposing the tax to be levied upon the company, and not upon the passenger, the arrears of taxes become an ordinary debt due from the company to the State, and there can be no pretence that the money sought to bo recovered in the present action was ever received to the use of the State, or that the company ever held it as belonging to the State, and as distinguished from money held in its own right. If, on the other hand, it be assumed, as has been done for the purpose of maintaining this form of action, that the levy is directly upon the passenger, and that the railroad company is merely the collector of the *380ta.xes for the State, then it may be conceded that the action for money had and received would lie.
But being of opinion, as we all are, that the levy is not upon the passenger, but upon the company, I must confess I am at a loss to understand why we should not put the judgment of this Court upon the proper ground upon which the State is entitled to recover. To adjudge the right to recover upon the mere assumption that the tax is levied directly upon the passenger, and is therefore illegal, as stated in the plaintiff’s first prayer, when we determine that in truth it is not so, would seem to be placing the State in a false position with respect to her rights. The question here is, not what would be the right of the State against the company in the event of the tax being decided illegal, but what is her right, and upon what ground is she entitled to recover, declaring, as we do, the tax to be constitutional and valid. I think the State ought rather to recover as for a valid tax levied upon the company, thaii as for an assumed illegal one levied upon the passenger and collected by the company. And with the views entertained by this Court in regard to the main question involved, that of the constitutionality of the law imposing the tax, I think we ought not to say of the plaintiff’s prayers that they were erroneously rejected by the Court below, as they raised directly the question of the applicability of the form of action to the right asserted by the State under the law imposing the tax.
I am therefore of opinion, that the judgment appealed from should be reversed for the error committed in granting the prayers on the part of the defendant,1 and that the cause be remanded in order that the State may obtain leave and amend its declaration, so as to entitle it to recover upon the true ground upon which the tax is due, that is, as a tax levied upon and due from the company.
The law having created the claim in favor of the State against the company, and given no specific remedy for its collection, an assumpsit exists upon which the State is entitled *381to recover in an action of assumpsit, but it must be upon a declaration properly framed, and not as for money had and received. See the case of The Mayor and City Council of Balto. vs. Howard, 6 Har. & John., 383.
I aru authorized by Judge Grason to say, that he concurs with me in this opinion.