
235 Cal.App.2d 161 (1965)
PHILIP G. GREENE et al., Plaintiffs and Respondents
v.
ROBERT G. BROOKS et al., Defendants and Appellants.
Civ. No. 22082. 
California Court of Appeals. First Dist., Div. Two.  
June 21, 1965.
 Thompson & Hubbard and Russell A. Thomson for Defendants and Appellants.
 Farr, Horan, Wilsdon & Lloyd and Richard T. Wilsdon for Plaintiffs and Respondents.
 TAYLOR, J.
 This is an appeal by defendants, Robert and Mary Brooks, from an interlocutory decree declaring the dissolution of their former partnership with respondents, Philip and Myrtle Greene, and ordering the sale and equitable distribution of partnership assets. Appellants contend that the judgment in favor of respondents must be reversed because: (1) the evidence is insufficient to support the court's finding that the parties had been associated as partners; (2) the court erroneously concluded that the prior municipal court judgment in respondents' action No. 17799 was res judicata as to the existence of the partnership; and (3) respondents, as *163 parties to an illegal contract, were precluded from judicial relief.
 Viewing the evidence most favorably to the judgment, as we must, the following relevant facts appear: Both the Greenes and the Brooks had experience as independent owners and operators of various cocktail lounges and clubs. The parties had known each other for years and had prior business dealings with each other. The Greenes had also sold a club known as the Hoosier Spot to the Brooks.
 After the closing of their last two operations, the Gold Rush Club and the Two Brooks, the Brooks had sizeable debts and in 1959 had surrendered their liquor license to the Alcoholic Beverage Control Board pursuant to its regulations (Cal. Admin. Code, tit. 4,  65). The Brooks were interested in getting their license reactivated before April of 1961, as it was then subject to cancellation by the State, and discussed this fact with the Greenes in the fall of 1960. Mr. Greene introduced them to a Mr. Brown, owner of the Valley Inn in Prunedale, and was present at some of the discussions between the Brooks and the Browns.
 After it developed that the owners of the Valley Inn were not interested, in January 1961 the Brooks and the Greenes discussed the matter of going into business together. Mr. Brooks indicated that the Greenes could become partners and buy a half interest in the license for $5,000. When the Greenes indicated that they did not have any money for such a purpose, the Brooks introduced them to a Mr. Charley O. Smith. As a result of a meeting with Mr. Smith in February of 1961, Smith lent the Greenes $10,000. Smith understood that the purpose of the loan was to enable the Greenes to buy a half interest in the Brooks' liquor license and to become partners in a business to be known as the Prunedale Club.
 All four of the parties searched for a site for their club. In February 1961 the Greenes found a suitable building owned by Mr. and Mrs. Slibsager. After discussions, during which it appeared that the Brooks preferred a sublease because of their financial position, the Greenes leased the building for five years from Mr. and Mrs. Slibsager and in turn subleased it to the Brooks. The main lease to the Greenes and the sublease to the Brooks were both dated March 10, 1961, and contained the same five-year terms, rentals, and an option to purchase the property at the end of the term.
 The parties further orally agreed that the Greenes were to remodel the rented premises and Mrs. Greene was to run the *164 card room in conjunction with the bar. Mr. Brooks was to make all of the decisions concerning the bar. The living quarters in the building were to be occupied by the Brooks. After the Greenes were unable to find anyone to do the remodeling work, Mr. Brooks quit his job and completed the extensive remodeling. It was agreed he would be paid for these services. The Greenes also worked on the building.
 As the Brooks were short of cash, Mrs. Greene advanced money for the remodeling of the building, certain equipment, advertising and bookkeeping expenses. The money came from an account opened with the proceeds of the Smith loan. The Brooks also contributed some equipment.
 After the leases were executed, the parties went to the offices of an attorney to discuss their partnership. There was some evidence that at that time, the Greenes were not interested in a formal partnership agreement as all of the Brooks' debts were not cleared up and the liquor license had not been released by the State. The Greenes understood that the license could be sold for the existing liens arising out of the Brooks' prior operations and did not know that another party, Mr. Hastings, was already a silent partner on the license to the extent of $1,780.
 At this time, the Brooks agreed that the Greenes' names would go on the liquor license as soon as it was cleared by the Board of Trade. The parties had a disagreement about several items to be contributed by the Brooks, as well as his compensation for bartending services, but left these matters to be resolved in the future.
 The Prunedale Club opened on June 9, 1961. The parties agreed that the profits would be split fifty-fifty and that no one would draw any pay until business improved. The checking account of the business required the signatures of Mr. Brooks and Mrs. Greene. The profits of the operation were deposited in this account and all checks were written with both signatures. The checks were drawn only for the expenses of the Prunedale Club and never for the personal expenses of any of the parties.
 Mrs. Greene arranged for electric and telephone service in the names of Greene and Brooks. The health certificate for the club was taken out in the names of Mr. Greene and Mr. Brooks. The Greenes put about $7,600 cash into the operation and about $600 worth of equipment. Pursuant to the oral agreement, Mrs. Greene ran the card room until her illness on June 20, 1961; Mr. Greene tended bar and helped to clean up.
 The books set up for the Prunedale Club by the accountant *165 showed salary and drawing accounts in the names of the Greenes and the Brooks. The accountant never saw a copy of a partnership agreement but got the impression from the parties that there was a partnership and set up the accounts on this basis. From the opening of the club in June until December 1961, Mr. Brooks drew $650 from his capital drawing account; Mr. Greene, the same amount from his capital drawing account. In the same period, Mrs. Brooks and Mrs. Greene each drew $50 from their capital drawing accounts. The Brooks' salary account showed withdrawals of $400 during this period; the Greenes' salary account, withdrawals of $250.
 About the time the club opened in June 1961, the parties had another meeting at an attorney's office to discuss and to settle the terms of their proposed written partnership agreement. Mrs. Greene indicated that she considered herself a partner from the time the club opened but was reluctant about the written partnership agreement at that time because of the Brooks' many debts and because she wanted a fifty-fifty partnership. After Mrs. Greene's illness, Mr. Brooks hired another dealer for the card room and split the profits with him. Early in November of 1961, the Greenes offered to buy the Brooks' half of the partnership for $10,000. The Greenes' tender of $10,000 was refused. Subsequently, the relationship of the parties broke down completely. Shortly thereafter, the Brooks excluded the Greenes from the Prunedale Club and the Greenes attached the club's liquor stock and filed various actions in the municipal court.
 The first question presented is the sufficiency of the evidence to sustain the trial court's finding that the Greenes and the Brooks were associated as partners. The appellants argue that, at most, the evidence indicates that they and the Greenes had an agreement to form a partnership in the future, but never executed this agreement since they could not agree on all of the terms.
 A partnership is an association of two or more persons to carry on a business for profit as coowners (Corp. Code,  15006, subd. (1)). The sharing of profits of a business is prima facie evidence that a partnership exists except where such profits are received as debts, wages or rent, interest on a loan or consideration for the sale of good will of a business or other property (Corp. Code,  15007, subd. (4); Brown v. Fairbanks, 121 Cal.App.2d 432 [263 P.2d 355]).
 [1] The ultimate test of the existence of a partnership is *166 the intention of the parties to carry on a definite business as coowners. Such intention may be determined from the terms of the parties' agreement or from the surrounding circumstances (Page v. Page, 199 Cal.App.2d 527 [18 Cal.Rptr. 897]; Haas v. Hodge, 171 Cal.App.2d 478 [340 P.2d 632]; Gardiner v. Gaither, 162 Cal.App.2d 607 [329 P.2d 22]; Wurm v. Metz, 162 Cal.App.2d 262 [327 P.2d 969]). [2] A partnership need not be evidenced by writing (Calada Materials Co. v. Collins, 184 Cal.App.2d 250 [7 Cal.Rptr. 374]). [3] It is immaterial that the parties do not designate the relationship as a partnership or realize that they are partners, for the intent may be implied from their acts (Constans v. Ross, 106 Cal.App.2d 381 [235 P.2d 113]; Singleton v. Fuller, 118 Cal.App.2d 733, 743 [259 P.2d 687]). [4] Some degree of participation by partners in management and control of the business is one of the primary elements of partnership (Rosenberg v. Broy, 190 Cal.App.2d 591 [12 Cal.Rptr. 103]).
 [5] The trial court properly concluded from the parties' conduct and oral understandings that although a written partnership agreement never materialized, they were nevertheless associated as partners in the operation of the Prunedale Club. The loan negotiations with Mr. Smith, the joint search for the premises, the lease and sublease arrangements executed in March, the combined efforts of the parties in remodeling and equipping the premises and in managing the business, Brooks' agreement that the Greenes' names were to go on the liquor license as soon as it was cleared by the Board of Trade, the sharing of profits, the presence of both names on the checking accounts, service accounts and health permits, are all facts indicating the parties' intention to carry on the Prunedale Club as coowners.
 Appellants testified and now argue that the reason for both names on the checking account was merely to discourage action by the Brooks' creditors, that the cost expenditures were personal loans to the Brooks and that Mr. Greene was an employee and not a partner. The uncontroverted evidence indicates, however, that no withholding statements were ever filed by Mr. Greene and that he had the same hours and received the same compensation as Mr. Brooks. We conclude that the evidence amply supports the conclusion that the parties to this action were in fact associated as partners from February 1961 until December 1961.
 Appellants cite the record and contend that the trial court based its findings of partnership entirely on the erroneous *167 ground of res judicata and indicated that it would have found no partnership had it relied on the evidence in the instant case.
 The trial judge said: "If I were not bound by that [the municipal court finding of fact] I think it [the evidence] would support a finding that they were not partners. However, I make a finding that there is a partnership on two grounds, Mr. Rosendale; one, that there was a partnership, two, that's res judicata. Two grounds, either one." (Italics supplied.)
 We interpret this to mean that while the evidence was subject to varying inferences and would have supported a finding of no partnership, yet the court did, in fact, find a partnership on both grounds of res judicata and the testimony of the witnesses. Nor does the trial judge's statement, that he would have sustained an objection to the introduction of the extensive partnership evidence because the issue had already been decided in the lower court, foreclose his consideration of such evidence where no such objection was, in fact, made or ruled upon. There is merit in appellants' contention that res judicata is not applicable in this case  [fn. 1] but the trial judge's comments clearly do not prevent an appellate court from determining that the finding of partnership was amply supported by the evidence (Eaton v. Brock, 124 Cal.App.2d 10, 16 [268 P.2d 58]).
 [6a] Appellants raise the defense that even if there was a partnership, it was doing business illegally without a partnership license as required by the Alcoholic Beverage Control Act,  [fn. 2] and that under the holding in Hooper v. Barranti, 81 *168 Cal.App.2d 570 [184 P.2d 688], respondents are powerless to recover their share of partnership assets. The facts disclose that the license had been issued only in the names of appellants.
 [7] We reject respondents' argument that the defense of illegality cannot now be raised for the first time. The trial court had the duty and power to raise it on its own motion (Lewis & Queen v. N. M. Ball Sons, 48 Cal.2d 141, 148 [308 P.2d 713]). Thus, for the purpose of this appeal, we treat the issue as though it were considered below and decided adversely to appellants.
 [6b] We think, however, that the leading partnership dissolution and accounting cases of Norwood v. Judd, 93 Cal.App.2d 276 [209 P.2d 24], and Denning v. Taber, 70 Cal.App.2d 253 [160 P.2d 900], are authority for respondents' right to sue and recover. In Norwood, which involved a contracting business operating illegally without a partnership license, the court distinguished Hooper v. Barranti, where it was actually agreed that a partnership liquor business be operated under an individual license. The court said: "In the Hooper case the very agreement itself provided for the conducting of the bar business for 15 months without a proper license. The agreement was, by its very terms, in direct violation of the statute, against public policy and void on its face. In the instant case, the agreement was not per se contrary to any statute. ... In the second place, in the Hooper case, it was impossible for the parties to have entered into a lawful agreement of partnership because Barranti was a noncitizen, and aliens cannot secure liquor licenses as a partner or otherwise. No citizenship requirement ... exists in connection with the issuance of contractors' licenses." (Italics supplied.) (P. 290.)
 In the instant case, there was no agreement providing that the liquor business be operated in an illegal manner nor was there any question but that the parties could have lawfully obtained a partnership license. The illegality involved was the failure to comply with a technical formality. Furthermore, the trial court might well have concluded from the record that *169 the greater fault for this failure was attributable to the Brooks. Assuming that all parties were informed of the requirements of the Alcoholic Beverage Control Act, the license was in the Brooks' names and it was the understanding that Mr. Brooks was to make all decisions concerning the bar.  [fn. 3]
 [8] As Justice Peters said in Norwood "... the courts should not be so enamored with the Latin phrase 'in pari delicto' that they blindly extend the rule to every case where illegality appears somewhere in the transaction. The fundamental purpose of the rule must always be kept in mind and the realities of the situation must be considered. Where, by applying the rule, the public cannot be protected because the transaction has been completed, where no serious moral turpitude is involved, where the defendant is the one guilty of the greatest moral fault, and where to apply the rule will be to permit the defendant to be unjustly enriched at the expense of the plaintiff, the rule should not be applied. That is the theory of the Denning case, and of the other cases above cited, and we think it is the correct and more enlightened rule." (P. 289.)
 [6c] The licensing statutes, such as the Alcoholic Beverage Control Act, are passed primarily for the protection and safety of the public and not for the benefit of a guilty partner who seeks to keep all of the fruits of a partnership enterprise for himself. Where the illegal transaction has been terminated, public policy is not protected or served by denying one partner relief against the other (cf. Epstein v. Stahl, 176 Cal.App.2d 53 [1 Cal.Rptr. 143]).
 The judgment is affirmed.
 Shoemaker, P. J., and Agee, J., concurred.
 This is not a finding as to the existence of the partnership. It relates only to the issue of lack of jurisdiction of the municipal court.
 Business and Professions Code section 23951: "The application shall contain the following: ... (b) In the case of a copartnership, the names of the individual partners."
 Business and Professions Code section 23953: "The application shall be signed by the applicant. In the case of a partnership the application shall be signed by each of the partners, and in the case of a corporation by an officer and under the seal of the corporation."
NOTES
[fn. 1]  1. In fact, it would appear that the finding of res judicata was in error as: 1) the municipal court has jurisdiction of actions for dissolution of partnership only where the total assets of the partnership do not exceed $5,000 (Code Civ. Proc.,  89, subd. 1(b)). The assets of the partnership here exceeded that amount; 2) the record shows that the Brooks prevailed in the municipal court action because the Greenes had sought the wrong remedy. The findings of fact recite that: "According to the testimony of each plaintiff, each claims a partnership existed between the plaintiffs and defendants; therefore, based upon their contentions the wrong form of action was brought by plaintiffs and their remedy, if any, is a suit for dissolution of a partnership."
[fn. 2]  2. Business and Professions Code section 23300: "No person shall exercise the privilege or perform any act which a licensee may exercise or perform under the authority of a license unless the person is authorized to do so by a license issued pursuant to this division."
[fn. 3]  3. Also on the question of relative fault, it is uncontroverted that the value of the Brooks' license was approximately $10,000 and that the Greenes thought they were purchasing a half interest therein and did not know that another prior creditor of the Brooks, a Mr. Hastings, was a silent partner in the license to the extent of $1,780.
