The plaintiff in error brought suit to recover $1,252.50, collected from him by the authorities of Uinta Coünty for taxes upon 66,800 head of sheep. He claims the right to recover upon the ground that the sheep in question were merely being driven by him across this State; that they never became identified with the property of the State and were not subject to taxation in Uinta or any other county of Wyoming, and that, moreover, they were never legally assessed for taxation. The District Court tried the case without a jury and gave judgment, upon the evidence, in favor of the defendant for costs.
It is conceded that if the property was in this State only for the purpose of being transported across, under such conditions as would constitute interstate commerce under the constitution and laws of the United States, it was not taxable under the state laws. It, therefore, becomes necessary for us to examine the evidence as bearing upon that question.
The testimony shows that the sheep in question were wethers, or feeding sheep, and that they were purchased in *428Western Idaho and Eastern Oregon, except one herd purchased in Southern Utah- They were bought for the purpose of being transported to Nebraska and Kansas and there fattened for the market. They reached the Wyoming border on the west and south from about the 24th or 25th of July to the 1st of August and occupied about three months in crossing the State. They were not fed, but subsisted during the journey by grazing upon the native grasses of the unenclosed lands. They were divided into convenient bands of five or six thousand head and traveled about four and a half to five miles a day. Plaintiff’s foreman, who had general charge of all the bands, testified the purpose was to get them through the State so they could get them into Nebraska and commence feeding by fall. He also states, “We went by the trail, the most direct route through the State we can go by, I guess, water route and everything.” The evidence was not in great detail as to the movement of the stock across the ■ State, partly no doubt from the fact that the ten or fifteen separate bands were spread out over quite a wide scope of country and were not under the immediate observation of the foreman, who was the only witness examined upon that subject, and partly because the manner in which sheep are moved and cared for and the general features of the country over which they passed are matters of general knowledge in this State and were presumed to be known to the court.
There was evidence introduced on behalf of the county that a fair average day’s travel for “trail”, sheep was eight or ten miles upon ordinarily good feed, and that they go further upon short feed, or no feed at all, because there is no object in holding them over. It does not appear just when the sheep in question were purchased, but we infer that sheep of this class are purchased in the spring or early summer, after shearing, when they may be .obtained at a low price. It is not desirable to begin to fatten them for the market until November, and in the meantime they must, *429in some way, be subsisted and cared for. Plaintiff's foreman testified that they could be driven across the State in this way twenty-five or thirty cents cheaper than they could be shipped by rail. Lack of railroad facilities was not one of the reasons for driving instead of shipping by rail, as at various times on the journey they were convenient to Union Pacific railroad stations. Without reciting the evidence in greater detail, we think it is a reasonable conclusion from all the facts in the case that the transportation of the sheep from Idaho and Utah to Nebraska was not the only, or the principal, purpose in trailing them across Wyoming. It is contended by plaintiff in error that they grazed-from day to day as a mere incident to the journey. But we think, under all the evidence, the contrary appears to be true, that movement of the herds eastward was incidental to subsisting them upon the grasses of this State during the three months that would intervene before it was time to ship direct to the feeding yards in Nebraska. The fact that they were ultimately destined for the feed yards in Nebraska and for the market further east is not specially significant in determining' whether they became incorporated into the mass of property in this State and subject to taxation as other property having its situs here. The great mass of sheep grown and owned in this State have the same destination and are finally disposed of in the same market. The way in which these herds were maintained and handled while in this State did not differ essentially from the manner in which resident owners maintain and handle their herds during the same season. Plaintiff’s foreman testified that the herds, for the most part, were driven to points in Nebraska a short distance east of the Wyoming line, and from there shipped by rail to the feed yards early in November. This, under all the circumstances of this case, seems to be only a different form of statement-of-the fact that,.having subsisted his herds for a fourth of the year in Wyoming by moving them slowly until an open range was no longer *430presented and the time for shipment had arrived, he. then shipped them to their destination. And it is plain that this differs very widely from the statement that they were merely in transit.
The- evidence as to how these herds were actually handled in crossing the State, the distance traveled each day, to what extent they spread out for the purpose of feeding, the approximate number of miles traveled and number of' days occupied in crossing the State, depends wholly upon the testimony of the plaintiff’s foreman; and it is neither very full nor very satisfactory. He does not profess to have any accurate knowledge on the subject. But he estimates the distance traveled across the State as probably 500 miles, and that it would require eighty-five or ninety days. He states that the average rate of travel was four and a half to five miles a! day, and that sheep could not safely be moved for that distance faster than five miles a day. He does not know, and there is no evidence, as to any of the herds, whether they traveled every day or, upon certain days, moved about only in grazing, without any attempt to make progress eastward. But he states that a part of the herds left the State about Tie Siding, a station on the Union Pacific railroad, the latter part of October and moved south through Colorado, and were shipped at Lamar, Colorado, on the Santa Fe railroad, about the nth of November. An inspection of the map indicates that the distance from the Colorado State line, at á point south of Tie Siding, to Lamar is not less than two hundred and forty miles upon a direct line and allowing nothing for the probable sinuosities of the trail in order to obtain food and water and a suitable road over which to drive. If this statement is correct, therefore, the rate of travel through Colorado must have very much exceeded five miles per day; and, indeed, must have very much exceeded ten miles per day. And if the herds might have been moved thrpugh this State in ,a„half or third of the time actually occupied, it indicates very strongly that they were held here *431for the purpose of being grazed until the proper season for shipping to the feed yards to be fattened. Indeed, the Deputy County Treasurer testifies that in arranging with plaintiff's agent, prior to the coming of the herds into this State, what number of days should be used as a basis in' estimating the amount to be paid for taxes, he informed him that it would be from sixty to seventy-five days. And the agent said he would take the limit of seventy-five days, as' he wanted to drive the sheep slowly.
We are, therefore, of the opinion that, in view- of the way in which resident owners handle their herds in this State, it cannot fairly be said that the transportation to the feed yards began until they were shipped by rail in Nebraska; that they were brought into this State for the purpose of being grazed, within the meaning of the statute; that they were not, at the time, the subject of interstate commerce, but that thé facts of the case bring them clearly within the rule enunciated by this court, in the two opinions in Kelley v. Rhoads, 7 Wyo., 237, and 9 Wyo., 352, and that they were subject to taxation in this State.
But plaintiff in error contends that the steps, required by the statutes, to lay the foundation for a valid tax were not taken; that there was, in effect, no assessment at all, but that an alleged tax was forced from the plaintiff, without even a pretended compliance with statutory requirements in the matters of assessment and levy, and that, having been paid under duress, it may be recovered in this action.
The tax in question was collected August 12, 1898. Prior to this the State Board of Equalization had fixed the valuation of live stock of this class at one dollar and seventy-five cents per head, and duly certified the same to the county board. The regular annual levy of taxes was made by the county board on the first Monday in September following, as required by law, and there is no intimation that these proceedings were not in all respects legal and regular. But that numerous irregularities occurred in the assessment and *432collection of the tax- sued for is apparent from the evidence. Much difficulty has been experienced in subjecting live stock to taxation coming into the State after the regular annual assessment, and there have been frequent changes in the legislation upon the subject. It was provided for in Sections 3845, 3846 -and 3847 of the Revised Statutes of 1887. In 1888 there was additional legislation, but the act contained no repealing clause. (Chap. 78, Laws 1888.) Another act was passed in 1895, which, likewise, contained no repealing clause. (Chap. 61, Laws 1895.) Again in 1897 an act was passed providing for the matter in detail and expressly repealing the acts of 1888 and 1895, but containing no reference to the sections of the Revised Statutes of 1887. The act of 1897 has since been repealed, but was in force at the time of the transactions involved in this case, and was apparently intended as supplementary to the provisions of the Revised Statutes. It made it the duty of the owner to list the property and of the assessor to assess it for taxation, and in case his assessment rolls had been completed to include it in a supplemental report. If the stock was brought in prior to the annual levy, as in this case, it was the duty of the assessor to collect from the owner forty cents per head upon cattle and ten cents per head upon sheep, such amount to be returned at the end of the year upon a showing 'that the regular annual taxes had been paid upon them, the same as other persons had paid upon like property permanently located in the State, or the excess over and above the taxes should be returned. But it was further provided that in lieu of such ten cents per head the owner might give bond that he would list the property for taxation and pay all taxes that might become due upon it for that year.
Without giving in greater detail the provisions of the statute with reference to the assessment and collection of the tax, it may be stated that in a number of particulars they were disregarded, and, indeed, there was no attempt *433at a strict compliance wth the method pointed out. The explanation of this failure will appear in the’ evidence to be given later on in such detail as may be necessary for a proper understanding of the case.
The remaining sections of the statute, instead of providing for the collection of the taxes which may become due by seizure and sale of the property, provide that any person failing to pay the ten cents per head or to give the bond above mentioned, shall be fined not less than ten nor more than a hundred dollars and forfeit the sum of fifty cents for each head of his stock, the forfeiture to be collected by ,a.civil action m.the-'name >of>the county.' And in case of an attempt to remove the stock with intent to evade the payment of the forfeiture, it is provided that an attachment may issue. And the statute contemplates that, in the case of such migratory stock, the taxes for all the counties of the State through which they may pass shall be collected by the authorities of the county into which they first shall come.
Under this state of affairs, it appears from the evidence that the County Commissioners of Uinta County had made an agreement or arrangement with the owners of such migratory stock by which, instead of making the deposit of ten cents per head, or giving the bond, as provided, and then adjusting the balance at the end of the year, they paid their taxes outright, estimated upon a basis agreed upon between them. That is to say, they were permitted to pay at the rate of twenty-five cents per day for each thousand head for the number of days occupied in passing through the State. The amount sued for in this action was paid in this way, the tax being calculated upon 66,800 head of sheep for seventy-five days, the period which the agent of plaintiff estimated would be occupied in driving through the State. At the same time the County Treasurer, who was ex-officio County Assessor, the assessment rolls having been completed, entered this, with similar transactions, *434upon a separate list, headed, “Transit stockmen who furnished bond and paid for trail grazing tax.” In this list was entered, in separate columns, the name of the plaintiff, the number of sheep reported by him in his certificate, the number of days paid for in the State and the total amount paid. This list was not certified or authenticated in any way, and the property in question does not appear upon the regular tax list. At the same time the agent of plaintiff, one Fred D. Hopkins,-took a receipt under date of August 12th, “Received from Fred D. Hopkins fifteen hundred seventy-five dollars, being payment taxes for the year 1898 on 84,000 head of sheep, valued at $174,000, for a period of seventy-five days in Wyoming,” the agent having stated in .his certificate the number of plaintiff’s sheep in Wyoming at 84,000 head. On the 15th, having ascertained that only 66,800 head had been brought in, he so reported to the assessor, who refunded to him $322.50, and endorsed that amount upon the receipt as refunded, and also gave him another receipt showing the reduced amount. At the time the payment was made the agent protested that the sheep were not liable to taxation and were not legally assessed, and filed a written protest with the officer to that effect.
From this recital, we think.it satisfactorily appears that the property was subject to taxation; that the assessment was not made in compliance with the terms of the statute, and that the payment was a payment for taxes, and not a deposit under the provisions of the statute. The question presented is whether the amount paid is • recoverable in this action.
The District Court passed upon the evidence and decided against plaintiff’s right of recovery. It is not insisted that the tax was excessive, if the property was taxable at all, and an examination of the tax list shows that the amount paid was not greater than the taxes would have been if regularly extended upon a valuation of one hundred and seventy-four thousand dollars as fixed by the state board.
*435If this were a proceeding to collect the taxes in question, by a sale of property or otherwise, or an attempt to justify the seizure or sale of property for that purpose, it would be necessary to show compliance with the terms of the statute with reference to the levy and assessment. Such proceedings depend upon statutory authority, and, upon a failure to show such compliance, the proceeding, or any justification under it, must fail.
But that is not this case, and a different rule governs. The tax has been paid, and this is in the nature of an action for money had and received to recover the amount. It is an equitable action,, and ,no recovery- can -be had except upon proof that the defendant has received money of the plaintiff which, in equity and good conscience, it ought not to retain. That is the basis and foundation of the action. The defendant may avail itself of any defense showing that it is legally or equitably entitled to the fund in question. Mere irregularities in the levy or assessment will not avail, and nothing short of proof that the tax was illegal and void will support a recovery. And, unless the action is brought under a statute requiring its repayment, it must also appear that the payment was made under compulsion. (Cooley on Tax. (2nd Ed.), 806, 808; Gilman v. Waterville, 59 Me., 493; Supervisors v. Manny, 56 Ill., 162; Hayford v. Belfast, 69 Me., 65; Bailey v. R. R. Co., 22 Wall., 638; Dillon Mun. Corp., Sec. 941; Wright v. City of Boston, 9 Cush., 241.)
This being the well settled law of such cases, it is difficult to perceive how, or upon what ground, the plaintiff can recover in this action. The property, as we have found, was subject to taxation in the county, the plaintiff has paid no more than his just proportion of taxes, and the county has received no more than was its right and duty to collect. The effect of a judgment that the amount should be refunded would be to remit the matter to the county authorities to again collect it upon a more formal assessment, or else to enable the plaintiff to avoid the payment of taxes which *436he is rightfully bound to pay, by reason of the fact that the property may have passed out of the jurisdiction of the taxing officers.
Moreover, the facts and circumstances of the payment make it clear that it was not made under compulsion, and at the same time illustrate the justice and wisdom of the rule that a voluntary payment cannot be recovered back. By the terms of the statute, the assessor must have collected from the plaintiff the sum of eight thousand four hundred dollars, upon his first return, or six thousand eight hundred upon the later one, unless he had elected to execute a bond with approved sureties for the payment of his taxes when they should subsequently be regularly levied. In that case there would have been a formal assessment and a computation of the taxes due, and a collection of them out of the sum deposited, or, in case it became necessary, by a suit upon the bond. The evidence shows that the method pursued in this case, for estimating the amount, was agreed upon for the convenience of the owners of stock of this description, so that payment might be made at once without the inconvenience of executing a bond or depositing a large sum of money. And we think the evidence is convincing that the plaintiff elected to avail himself of the privilege extended to other stock owners of paying the smaller amount as taxes, rather than to make a deposit of the larger sum or execute the bond permitted by the statute. True, the agent states that he desired to give bond, and that he offered to give whatever bond should be prepared for him to execute. But he tendered no bond. It was no part of the.duty of the assessor, and he had no power, under the statute, to require a bond. His duty was to require the deposit of ten cents per head, and to avoid making such deposit the statute gave to the defendant the privilege of giving the bond in its stead. He was chargeable with knowledge of the law, and the •deputy assessor testifies'also that-it was explained to him; that he only offered to give bond for the amount of the esti*437mated taxes, and did not offer to give the bond provided for by the statute; that he was informed that no bond could be accepted for the estimated taxes, as that was by agreement, and not under the statute; that a payment under the statute would have to be at the rate of ten cents per head. We think the evidence was amply sufficient to justify a finding by the court below that, the payment was made as a matter of choice by the defendant, instead of standing upon the terms of the law.
This was a voluntary and not a compulsory payment. The rule in such cases is stated by C. J. Shaw in Preston v. Boston, 12 Pick., 13. After stating that a party who has paid voluntarily under a claim of right, shall not afterwards recover back the money, although he protested at the time against his liability, the opinion proceeds: “But it is otherwise when a party is compelled by duress of his person or goods to.pay money for which he is not liable; it is not voluntary, but compulsory, and he may rescue himself from such duress by payment of the money and afterwards, on proof of the fact, recover it back. What shall constitute such duress is often made a question. Threat of a distress for rent is not such duress, because the party may replevy the goods distrained and try the question of liability at law. Threat of legal process is not such duress, for the party may plead and make proof, and show that he is not liable. But the warrant to a collector, under our statute for the assessment and collection of taxes, is in the nature of an execution running against the person and property of the party, upon which he has no day in court, no opportunity to plead and offer proof and have a judical decision of the question of his liability. Where, therefore, a party not liable to taxation is called upon peremptorily to pay upon such warrant, and he can save himself and his property in no other way than by paying the illegal demand, he may give notice that he so pays by duress and not voluntarily, and, by showing that he is not liable, recover it back as money had. and received.” *438This statement of the rule is approved by the Supreme Court of the United States. (R. R. Co. v. Commissioners, 98 U. S., 545.) And the fact that the party at the time of making the payment files a written protest does not make the payment involuntary. (Ib. Idem; Lamborn v. County Commissioners, 97 U. S., 181; Wabaunsee County v. Walker, 8 Kas., 431; Dillon’s Mun. Corp. (4th Ed); Sec. 947.)
' Applying this rule, we think it is clear that the payment was in no sense compulsory. The taxes were not due and the officer had in his hands no warrant for their collection. By pursuing either, of the methods pointed out by the statute, the plaintiff could have secured his property against the threatened seizure and have had ample opportunity to litgate the question of his liability. He could not avail himself of the agreed basis of settlement, and at the same time place himself in the attitude of contesting his liability. It was a voluntary payment and he cannot recover.
We do not overlook the fact that we have a statute requiring the Board of County Commissioners to direct the treasurer to refund any erroneous or illegal tax, and that such statutes are usually held to be mandatory, although the payment was voluntary. (R. S. 1899, Sec. 1863; R. S. 1887,, Sec. 3821.) The plaintiff in error does not claim any right of recovery by virtue of that section, and, moreover, he has not brought himself within its terms. The provision is that the board shall direct the treasurer to refund, and this language implies the necessity of an applicaton to the board,, for the purpose, before it can be deemed to be in default. (Bibbins v. Clark, 90 Ia., 239.) And, further, it is not sufficient, under the statute, that some irregular or unauthorized method was resorted to in the assessment, but it must appear that the tax itself was erroneous or illegal; that is,, that it was not justly or equitably due from him. (Board v. Searight Cattle Co., 3 Wyo., 787; Board v. Armstrong, 91 Ind., 536.)
Upon the whole case, we are of the opinion that it appears. *439that the plaintiff in error has simply paid his taxes, and that he has paid no more than if the irregularities complained of had not occurred. It does not appear that he has been damaged, or that the county has received from him any moneys to which it is not equitably entitled.
The judgment will be affirmed.
Potter, C. J., and Knight, J., concur.