This is a special assumpsit upon a contract by which defendant agreed to convey certain land to the plaintiff. The first count of the complaint, which was filed September 24, 1894, avers, in substance, that on the twelfth day of December, 1887, in California, plaintiff and defendant entered into a written contract by the terms of which defendant agreed to sell to plaintiff lot 11 in block 358 of Pacific Beach for $500, with interest on deferred payments at ten per cent per annum, payable $167 at date of agreement, $166 and interest June 12, 1888, and $167 and interest December 12, 1888; and defendant further agreed that, “in consideration of plaintiff making such payments, to execute to him upon his demand a grant deed conveying to him the real property above described. ’ ’ The complaint then avers the payment by plaintiff of the sums at the times specified therefor, except that the last payment was made before due, viz., October 10, 1888, and that a discount of five per cent was made on account of such sooner payment. Total amount paid, $512.90. That in September, 1891, plaintiff demanded a deed, which defendant neglected and refused to execute. On the seventh day of October, 1893, plaintiff demanded of defendant the repayment of the sum of $512.90 so paid, and offered to restore defendant everything of value received under the contract, which was refused by defendant. That plaintiff has been damaged in the sum of $512.90 and interest from the respective times of payment. There are four other precisely similar counts or causes of action set out in the complaint, except that they arise on a precisely similar agreement to convey lots 12, 13, 14 and 15, in the same block of land. Defendant demurred to the complaint, averring in apt terms,, among other things, that plaintiff’s causes of action were barred by the provisions of sections 337, 339, 343 of the Code of Civil Procedure. The demurrer was overruled, and thereupon defendant answered, setting up as a defense the bar of the causes of action by said several sections of the Code of Civil Procedure, as in the demurrer. Judgment was rendered in favor of plaintiff upon the said five several causes of action, as prayed for in the complaint, except that interest was allowed only from October 7, 1893, the date when plaintiff demanded repayment. Defendant appeals from the judgment and from an order denying its motion for a new trial.
*321The only point made on the appeal relates to the bar of the causes of action under the statute of limitations. We need not refer to the findings, for the reason that, while they are full and complete in favor of plaintiff upon the several pleas of the sections, respectively, of the statutes of limitations, the demurrer presents the whole question with equal clearness and perspicuity. The action, as before stated, is special assumpsit upon the written agreement. The contention of appellant is that this is not “an action upon any contract, obligation or liability founded upon an instrument in writing executed in this state,” but is an action of implied assumpsit, upon the defendant’s breach of its contract to convey, to recover the purchase money paid; and consequently subject to the bar of subdivision 1, section 339 of the Code of Civil Procedure; in other words, that the action was barred within two years after the cause of action arose. What we term an implied assumpsit arises in all that class of cases in which money is due from the defendant to the plaintiff ex aequo et bono, and it may be recovered in an action for money had and received. In the large class of cases in which an action for money had and received will lie, no express promise need be averred or proven under our system of practice; but upon proof of the facts showing the duty to devolve upon the defendant to make payment, the law raises the implied promise to pay. The action is most frequently resorted to in actions ex contractu, where no recovery could be had upon the contract actually made, as, for instance, where money has been paid upon contracts void under the statute of frauds, in cases of the rescission of the contract, cases of the payment of money under a mistake of fact, etc. But in the present instance the liability of the defendant is founded upon the instrument in writing pleaded in the complaint, viz., the contract to convey the lots of land. The obligation of defendant is founded directly upon a breach of that contract, not remotely or ultimately, as in Chipman v. Morrill, 20 Cal. 131, but immediately, as a necessary sequence of the violation of the contract to convey, upon which plaintiff had paid his money. When defendant, upon payment by plaintiff of the purchase price, refused to convey the land as provided for in its contract, it was guilty of a breach of that contract, for which an action would lie in favor of plaintiff, either for a specific performance of the contract to convey, or *322in damages for the refusal. In the latter case plaintiff was entitled to recover as damages, under section 3306 of the Civil Code, the price paid, and interest thereon, together with his expenses properly incurred in examining the title, etc. Plaintiff counts upon the violation of the contract, and seeks to recover the price paid and interest. If this is not an action upon a contract, obligation or liability founded upon an instrument in writing, etc., within the purview of section 337 of the Code of Civil Procedure, it would be difficult to name one that is. It follows that plaintiff had, under that section, four years within which to bring the action after the breach occurred.
2. When did plaintiff's cause of action accrue 1 In an ordinary agreement to convey land upon payment of the purchase price the obligation of the vendor to convey arises upon the payment by the vendee of the agreed price, and no demand of a conveyance is necessary: Chatfield v. Williams, 85 Cal. 518, 24 Pac. 839; Camp v. Morse, 5 Denio (N. Y.), 164. In such a ease the statute of limitations begins to run from the date when the vendee was entitled to bring his action, viz., the date of the final payment. But that is not this case. The parties had a right to make such contract as they saw fit. They might have provided that a deed should have been executed and delivered thirty days, or at any other specified time, either before or after the final payment was made. What they did in fact agree upon in writing was, as is averred in the complaint, not denied by the answer, and found by the court, as follows: “And defendant further agreed, in consideration of plaintiff making such payments, to execute to him, upon his demand, a grant deed conveying to him the real property above described.” Under this agreement a demand was a condition precedent to the duty of defendant to convey, and until it was made plaintiff’s right of action was not complete: Bolles v. Stearns, 11 Cush. (Mass.) 320; Gould, Pl., c. 4, sec. 15; Rice v. Churchill, 2 Denio (N. Y.), 145. Under the wording of the contract the agreement to convey was not a dependent one, but an independent covenant that in consideration of payment defendant would thereafter, when demand was made, convey the property. The demand for a conveyance was made upon defendant in September, 1891. This demand set the statute of limitations in motion from that date, and as the action was commenced within four years next *323thereafter, it was not barred. The judgment and order appealed from should be affirmed.
We concur: Vanclief, C.; Belcher, C.
PER CURIAM.For the reasons given in the foregoing opinion the judgment and order appealed from are affirmed.