
154 Cal.App.2d 767 (1957)
LAWRENCE CROSLIN, Appellant,
v.
HARRIET A. SCOTT, Respondent.
Civ. No. 17374. 
California Court of Appeals. First Dist., Div. One.  
Oct. 30, 1957.
 Nelson, Boyd & Menary for Appellant.
 Guy A. Ciocca for Respondent.
 BRAY, J.
 Plaintiff appeals from an order granting a nonsuit at the end of the trial.
 Questions Presented
 1. Whether a ruling on a motion for a nonsuit may be reserved to and determined at the end of the trial instead of at the conclusion of plaintiff's evidence.
 2. The propriety of the nonsuit. This depends upon whether there was evidence which would support a finding (contrary to the court's implied finding) that the oral agreement sued upon was not based upon illegal and immoral consideration.
 Record
 Plaintiff alleged an oral agreement by which defendant was to cause a certain lot to be put in their joint names in return for plaintiff's expenditure of labor and money in the building of a house thereon. Defendant cross-complained for moneys had and received and for services rendered. She also counterclaimed for damages for alleged battery. At the conclusion of plaintiff's evidence defendant moved for a nonsuit. *769 The court reserved its ruling. No further evidence concerning the issues raised in plaintiff's case was offered, but defendant proceeded solely with evidence upon her cross-complaint and counterclaim. At the end of the trial the court granted the nonsuit.
 Evidence
 Plaintiff and defendant had lived together as man and wife, though not married, under an agreement made in 1944 that he would furnish the home and that she would furnish the food and do the cooking and housekeeping. In December, 1947, this relationship was terminated, plaintiff going to Grass Valley where he married another woman. In January, 1948, defendant wrote plaintiff indicating that she missed plaintiff. Plaintiff answered stating that he was dissatisfied with his wife. About two weeks later defendant wrote again asking plaintiff to return to her saying she would give him the "extra lot" for the work he had done on and the money put in certain property belonging to defendant (not the property involved herein). Plaintiff telephoned in reply "I accepted her proposition ..." On February 29, 1948, plaintiff's marriage having been annulled, he returned to live with defendant. In May of 1948 plaintiff went to Auburn to work. Defendant came up and visited him for two weeks. They discussed building a house on the "extra lot." Plaintiff testified that "we would go ahead as she had promised on the terms that she had promised when I was at Grass Valley." With defendant's approval plaintiff purchased lumber for this purpose. Plaintiff in October, 1948, started work on the house, having drawn plans therefor with defendant's aid. When completed in early 1950 the parties moved in. Plaintiff claims his work and labor on the house was worth $7,631, and that he spent $6,114.54 for materials. Defendant also put money into the house. Soon after they moved in plaintiff asked defendant if she was going "to give me something to show for my interest in that property." She said "Yes." She made the same reply to a question six months later. In January of 1953 defendant asked plaintiff if he wanted the house sold and the proceeds divided. He said that he just wanted "something to show for my interest in the property." Plaintiff testified that he considered he was working on his own house, that he would be given a deed to the lot, but that after defendant put money into it she stated it would be a partnership deal and she told others that they were partners. *770
 March 29, 1954, the parties quarreled over $20 plaintiff claimed was missing from his wallet. Plaintiff left the house and has not returned since. Defendant had plaintiff arrested for a battery occurring during the wallet incident. Plaintiff pleaded guilty thereto.
 Defendant denied making any offer of the lot in her letter to him at Grass Valley or that when he called her on the phone from there, anything was said concerning her alleged offer. In February, 1948, plaintiff asked her to take him back, saying, " 'We will build a home, and I will pay what I can, and you can pay the rest, and we will live as common-law--common-law husband and wife, because there are so many people that are doing it in the County of Marin,' and there was nothing to be ashamed of." Defendant conceded the work done by plaintiff in the home and his supplying certain materials. She stated that the parties after they moved in had no discussion regarding the disposition of the house, nor did she ever voluntarily propose selling it and dividing the proceeds, except that she was forced to make this latter proposition when plaintiff was drinking. She stated that the agreement in the beginning was that plaintiff was to have a home to live in for the rest of his life if he behaved and quit drinking.
 On cross-examination, defendant's counsel rather skillfully examined plaintiff concerning the allegations of the complaint and succeeded in getting plaintiff to say that the agreement made on the phone in Grass Valley was that they were to cohabit as man and wife, share expenses in maintaining the household, jointly pay for materials and work that went into the construction of the house, and that he was not going to build the house unless they lived together as man and wife.
 1. Court's Right to Reserve Ruling on Motion for Nonsuit.
 Plaintiff agreed to the court making the reservation after the court pointed out that as the court desired authorities on the subject there were two alternatives, one, to submit the motion for nonsuit, adjourn the trial to give the court a chance to study the authorities and then rule on the motion, or proceed with the case and at its conclusion and after receipt of memoranda, to rule on the motion, and if denied to then decide the case. Plaintiff stated that he would prefer the second course and also to submit authorities. This was done. Defendant agreed to this. As defendant's testimony as to the issues raised by the complaint had already been received, the case proceeded on the issues raised by the cross-complaint. *771 [1] Although "It is a most unusual procedure in a nonjury case for the court to grant a nonsuit after the complete evidence of the parties has been received" (Howard v. General Petroleum Corp. (1951), 108 Cal.App.2d 25 [238 P.2d 145]), the court has such power. (Idem. See also Estate of Morey, 147 Cal. 495, 502 [82 P. 57].) It may even be granted at the end of defendant's case even though the motion has previously been made and denied.
 2. Alleged Illegality of the Agreement.
 It seems conceded that the court granted the nonsuit upon the ground of illegality of the alleged agreement. [2] As said in Williamson v. Pacific Greyhound Lines, 78 Cal.App.2d 482 [177 P.2d 977], upon a motion for nonsuit (p. 485): "... the rule is almost axiomatic that the court is bound for the purpose of the motion to accept and treat as true every piece of evidence which tends to establish the plaintiff's case and to reject all which tends to disprove it. Every reasonable inference must be indulged in plaintiff's favor, and if two reasonable inferences may be drawn from the established facts, one of which is favorable to the case of plaintiff and the other unfavorable, that which is favorable must be accepted and that which is unfavorable rejected." [3] Thus, if in the present case it may be as reasonably inferred from the proved facts that the agreement claimed by plaintiff to have been made was a legitimate one as that it was illegitimate, the inference in favor of the former must be drawn. [4] The mere fact that parties agree to live together in meretricious relationship does not necessarily make an agreement for disposition of property between them invalid. It is only when the property agreement is made in connection with the other agreement, or the illicit relationship is made a consideration of the property agreement, that the latter becomes illegal.
 In Trutalli v. Meraviglia (1932), 215 Cal. 698, 701 [12 P.2d 430], it was said: "The fact that the parties to this action at the time they agreed to invest their earnings in property to be held jointly between them were living together in an unlawful relation, did not disqualify them from entering into a lawful agreement with each other, so long as such immoral relation was not made a consideration of their agreement."
 It is also stated in Hill v. Estate of Westbrook (1950), 95 Cal.App.2d 599, 602 [213 P.2d 727], that "Although the parties live together in illicit relationship during the time the services are performed, an express contract to compensate for *772 services performed as a housekeeper has been held valid and enforceable unless made in contemplation of such illicit relationship."
 And this court in Garcia v. Venegas (1951), 106 Cal.App.2d 364, 368 [235 P.2d 89], said: "But when, as here, they entered into a contract to pool their work and earnings and share equally in the property accumulated therewith, and the illicit relationship was not so involved in the contract as to render it illegal, the law recognizes the contract and enforces the rights arising out of it. Such a joint business enterprise, somewhat akin to a partnership, is one which any two persons (two women or two men, for example) might undertake."
 [5] The testimony of plaintiff is somewhat unsatisfactory and perhaps even contradictory. The evidence probably compelled a finding that there was an agreement entered into between the parties in February, 1948, in which plaintiff accepted her offer to give him the lot in return for his previous services provided he returned to live with her. This agreement would be an illegal one and unenforceable. But viewing the evidence in the light of the rule requiring us to consider the inferences most favorable to plaintiff, the court could have found that later and after the parties were living together a new agreement was made, namely, that in consideration of plaintiff performing labor and furnishing materials in the building of the house it was to be deeded to him, and that that agreement was modified when defendant also put money into the house to an agreement that the parties would hold the property jointly. While the parties were then living in a meretricious relationship the court could have found that the continuance of such relationship was not a part of either agreement nor consideration therefor. As in the Garcia case, supra, the illicit relationship was already existing and the court could have found that the "illicit relationship was not so involved in the contract as to render it illegal;" therefore the law could recognize the contract and enforce the rights arising out of it.
 The order is reversed, and inasmuch as under stipulation of the parties the entire case in addition to the motion for nonsuit was submitted to the trial court, the matter will be remanded to the trial court for its determination of the facts and judgment.
 Peters, P. J., and Wood (Fred B.), J., concurred.
