delivered the opinion of the court.
According to the bill of exceptions the trial judge seems to have proceeded upon the theory that the diversion by the bank of the proceeds of the sale of the grain from the payment of defendant’s lien thereon to the liquidation of its own chattel mortgage upon the same crop was solely a conversion sounding in tort which could not be made the basis of a counterclaim in an action arising upon contract.
1, 2. If the defendant had a lien upon the crop he could have recovered the grain in replevin alleging himself to be the owner thereof and proving the averment by showing the fact that he had a lien upon the property at least as against those who had actual notice of his claim although the same may not have been recorded: Reinstein v. Roberts, 34 Or. 87. (55 Pac. 90, 75 Am. St. Rep. 564). We note in passing that it is charged in the answer that the plaintiff knew the nature and extent of the defendant’s lien upon the grain after-wards included in the plaintiff’s chattel mortgage. By virtue of his qualified property in the crop the defendant was authorized to follow it as far as he could trace it and to sue at law for the substituted property: Terry v. Hunger, 8 L. R. A. 216, 218, note. It having been converted into money, the defendant’s right of property attached to that money at his option to the extent of his lien on the crop from which the cash was derived.
3, 4. The plaintiff was fully aware of the nature and extent of the defendant’s property in the specie, and having gained possession of the money which in equity and good conscience, according to the allegations of the answer, belonged to the defendant, the latter was not compelled to sue in tort for damages arising from the wrongdoing of the plaintiff. He was entitled to *586bring an action as for money had and received which sounds in contract. As stated in 1 C. J., p. 1033, Section 159:
“The rule is well settled that, where personal property has been wrongfully taken and converted into money or money’s worth, the owner may waive the tort and sue the wrongdoer in contract for money had and received, upon the theory that he ratifies the sale as made for his benefit and sues to recover the proceeds as money had and received to his use” — citing many authorities.
In such cases the law implies a promise, or in other words, a contract on the part of the recipient of the money to pay it to the one to whom it justly belongs. Some precedents illustrating various conditions under which the action for money had and received will lie are collated in Wagener v. United States National Bank, 63 Or. 299 (127 Pac. 778, 42 L. R. A. (N. S.) 1135). True indeed it is, that an action for damages would lie upon such a transaction; but the one who is rightly the owner of the money has the election to proceed upon the implied contract as for money had and received and the authority to choose is vested in him. The other party cannot elect that he himself shall be sued for the tort and not upon the implied contract.
The action here being upon a note is one arising on contract and it is said in Section 74, L. O. L., in its amended form that
“the counterclaim mentioned in section 73 must be one existing in favor of a defendant and against a plaintiff between whom a several judgment might be had in the action and arising out of one of the following causes of action. * * 2. In an action arising on contract, any other cause of action arising also on contract, and existing at the commencement of the action. ’ ’
Embodied in the answer, therefore, we have a statement of facts out of which the law raises the implied *587contract on the part of the plaintiff to pay to the defendant the money derived from the crop which was burdened by the defendant’s lien to the extent of that encumbrance. The situation thus is one to which the statute above quoted applies and the matter stated in the answer amounts to a “cause of action arising also on contract” within the meaning of the code.
The matter is plain: If we suppose that the lien of the defendant had been foreclosed making the plaintiff a party defendant to the proper proceeding for that purpose, and that in pursuance thereof the grain had been sold, there can be no question to whom the money in the first instance would have belonged at least covering the defendant’s lien upon the property. The only disposition which rightly could have been made in such a case would have been first to pay the defendant the amount of his notes which he left with the plaintiff for collection and next to apply the surplus, if any, to the liquidation of the plaintiff’s chattel mortgage. According to the averments of the answer the plaintiff, in substantially such a juncture, diverted the money from the satisfaction of the defendant’s lien to the payment of its own inferior claim thus carrying the proceeds into its own possession with the result that it had and received to the use of the defendant the amount of his notes in its hands to be collected making itself amenable to an action arising on the contract which the law imputes to it to pay to the defendant what it had thus received. The court was in error in refusing to allow the defendant to prove the allegations of its answer. The judgment is reversed for a new trial. Reversed for New Trial.
Mr. Chief Justice McBride, Mr. Justice Harris and Mr. Justice McCamant concur.