This is a suit for $50 which plaintiff alleges he paid to defendant on a contract which he claims defendant failed to perform. The suit Avas commenced in a justice’s court. The facts are, that plaintiff gave to the defendant according to his oavti statement $47.50 for $50, of his salary as policeman of *393the city of St. Louis, for the month of November, 1901. At the time of the transaction, defendant made an assignment of that much of his salary to plaintiff and executed a power of attorney authorizing plaintiff to collect the same. The defendant collected his entire salary for the month, hence this suit. The court instructed the jury to return a verdict for defendant and the judgment being for defendant plaintiff a-ppealed.
The plaintiff denominates his action as one for money had and received, but his statement shows that he is making a claim not for the $47.50, which he paid defendant but for $50 the amount of salary for which he contracted with interest at six per cent from the date of the contract December 1, 1901. The proceeding was begun in a justice’s court and the plaintiff’s statement there filed after alleging the transaction contains the following allegation: “Defendant did not comply with and fulfill his said contract with paintiff, in that defendant failed and refused to repay plaintiff the fifty dollars had and received as above stated, and failed and refused to pay over all or any part of the salary above sold and set over to plaintiff. Defendant colected the above salary on or about December 1, 1901, and retained the same, refusing to pay the same to the plaintiff as he had agreed to do.”
It is well settled law that an assignment or a contract of sale by a public officer of his salary is contrary to public policy and void. [State v. Williamson, 118 Mo. 146; State ex rel. v. Kent, 98 Mo. App. 281.] Courts will not aid the enforcement of such contracts. [Roselle v. Farmers’ Bank, 141 Mo. 36; Kitchen v. Greenabaum, 61 Mo. 110; Parsons v. Randolph, 21 Mo. App. 353.]
This case being in the nature of an action to recover damages for a violation of the terms of the contract is tantamount to an action to enforce and therefore cannot be maintained. It is a principle of law; “that a party to an unlawful contract shall not receive *394the aid of the law to enforce that contract, or to compensate him for the breach of it.” [Hall v. Corcoran, 107 Mass. 1. c. 256.]
And it is held in Parsons v. Randolph, 21 Mo. App. 353, that, “The plaintiff cannot recover whenever it is necessary for him to prove, as a part of his cause of action his own illegal transaction.” The plaintiff not only pleaded the illegal transaction but he testified to it at the trial.
The cause is affirmed.
All concur.