Rose, J.
This is an action to recover bach a payment of $50 on •the purchase price of 244 acres of land in Cuming county under a petition containing allegations to the effect that defendant agreed to convey the land to plaintiff for $12,810 and subsequently repudiated the contract. Defendant demurred on the grounds that the petition does not state facts sufficient to constitute a cause of action and that the action is barred by the statute of limitations. The district court sustained the demurrer on both grounds. Plaintiff refused to plead further and the action was dismissed. This is an appeal by plaintiff.
The questions presented require an examination of the *455petition, which alleges, in substance, that on June 10, 1902, plaintiff by ljis agent, William Givens, purchased from defendant 244 acres of land in Cuming county at $52.50 an acre, and as a partial payment gave Givens a $50 check for defendant, who cashed it and retained the money with full knowledge that plaintiff was purchaser and that Givens acted as plaintiff’s agent; that defendant agreed to convey the land within a reasonable time and to furnish an abstract showing good title, whereupon plaintiff was to pay $12,760, the remainder of the purchase price; that the check was indorsed by Givens, and that it was in the following form: “West Point, Neb., June 10, 1902. Pay to the order of William Givens ($50) fifty and no-100 dollars. J. Thiele. Part payment on land deal for J. E. L. Carey land. Paid June 14,1902. Nebraska State Bank, West Point, Nebraska”; that upon the giving of the check defendant gave a receipt as follows: “June 10, 1902. Received from William Givens $50 on farm for two weeks. J. E. L. Carey. Witnessed by O. L. Stockman”; that plaintiff at all times has been and is now ready to perform his part of the contract, and has at all times insisted and now insists upon its performance; that the failure to perform was and is exclusively the fault and neglect of defendant; that plaintiff frequently, until the commencement of the suit, demanded performance of the contract, but defendant rescinded the same and refused to perform; that on July 15, 1903, plaintiff and his agent again demanded performance and the execution of a deed, and that defendant then repudiated his agreement, rescinded the contract, and stated he would not be bound by ■it and would never deed the property to plaintiff; that at the time of making the contract defendant had no title to a portion of the land, 160 acres in extent, having acquired title thereto December 14, 1905, and conveyed the same February 28, 1906, to Johann Brelimer for $8,574.15, thereby divesting himself of the power to keep his agreement. The prayer is for judgment for $50 and interest from June 10, 1902.
*456The holdings of the trial court'that the petition is insufficient and that the action is barred by the statute of limitations lead to an inquiry into the nature of plaintiff’s cause of action, if one exists under the facts pleaded. The petition does not state that plaintiff entered into possession of the preanises under his contract, and consequently no question of surrendering possession is material to the inquiry. It is clear the pleader did not attempt to sue for damages for breach of contract. The only relief sought is a recovery of the purchase money paid and interest, the consideration for the payment having failed. Plaintiff might have brought a suit on the contract for a breach of its provisions, and might have asked to recover the «$50 payment as an item of damages. Much a suit could have been brought as soon as vendor refused to perform. Beck v. Staats, 80 Neb. 482. This, however, he did not do. The petition nevertheless states a cause of action, if the facts alleged bring plaintiff’s case within the well-established rule that a party who has made a payment of purchase money on a contract which has been rescinded under circumstances entitling him to a return of the amount paid may recover the same in an action for money had and received. White v. Wood, 15 Ala. 358; Scott v. Wallick, 24 Ind. 124; Hunt v. Sanders, 1 A. K. Marsh. (Ky.) *552; Wright v. Dickinson, 67 Mich. 580; Davis v. Strobridge, 44 Mich. 157; Atkinson v. Scott, 36 Mich. 18; Taylor v. Read, 19 Minn. 372; Weaver v. Bentley, 1 Caines (N. Y.) *47; Bier v. Smith, 25 W. Va. 830; Simmons v. Putnam, 11 Wis. *193; Tollensen v. Gunderson, 1 Wis. 103. While an action for money had and received is not. recognized by the code, the courts of this state have authority to apply the principle on which it rests. Excluding immaterial statements as to defendant’s breach of contract by refusal to perform, enough is alleged in the petition to sIioav that defendant received and retained «$50 of purchase money which in justice and fairness he ought to return to plaintiff, and the latter’s remedy under the facts stated is a civil action in the na*457ture of one for money had and received. School District v. Thompson, 51 Neb. 857.
The next inquiry is: When did the statute of limitations begin to run? The answer to this question depends on the date when the cause of action accrued. As long as the contract of purchase was in force, plaintiff could not maintain an action of this nature. Such an action will not lie until the contract has been terminated. Middleport Woolen Mills Co. v. Titus, 35 Ohio St. 253; Towers v. Barrett, 1 T. R. (Eng.) 133; Simmons v. Putnam, 11 Wis. *193. In Chesapeake & Ohio Canal Co. v. Knapp, 9 Pet. (U. S.) *541, *565, the supreme court of the United States said: “There can be no doubt that where the special contract remains open, the plaintiff’s remedy is' on the contract; and he must set it forth specially in his declaration. But if the contract has been put an end to, the action for money had and received lies, to recover any payment that has been made under it.”
It is positively stated in the petition that defendant rescinded the contract July 15, 1903, and declared he would never deed the property to plaintiff. To that time at least plaintiff demanded performance and stood upon the contract. After that date he acquiesced in the rescission, elected to consider the contract at an end, and brought suit for the sole purpose of recovering his payment of purchase money. Until the contract was actually at an end by his consent to the rescission, plaintiff had a right to insist on performance. As long as plaintiff was in good faith demanding a conveyance under the contract, when it was in force, he could not maintain a suit to recover back the payment made. In Simmons v. Putnam, 11 Wis. *193, it is said: “If the contract is not rescinded, but remains open and in force, an action for money had and received Avould not lie to recover back the consideration paid, but the remedy was an action for damages.” It follows, therefore, that the statute of limitations does not begin to run against an action for money had. and received, Avhen brought for the sole purpose of recovering *458back a payment made under a contract to purchase land, until the agreement has been rescinded or otherwise terminated. Collins v. Thayer, 74 Ill. 138; Walker’s Assignee v. Walker, 21 Ky. Law Rep. 1521, 55 S. W. 726; Richards v. Allen, 17 Me. 296; Fogal v. Page, 13 N. Y. Supp. 656. In .the present case the check through which defendant received the money was marked paid June 14, 1902, but it does not appear on the face of the petition that the contract had been terminated at a date earlier than July 15, 1903. Defendant admits the suit was commenced May 4, 1907. The time between these dates being less than four years, the petition does not show on its face that the action was barred. The contrary holding of the trial court was therefore erroneous.
Reversed.