Deemer, J.
1. Partnership for the sale estate: abandonment: commissions: Plaintiff claims: That about April 1, 1907, he entered into a copartnership with defendant to do a general real estate brokerage and commission business in the city of Osceola, Iowa; that each , • . ■, . ,. ,. was to give ms entire time to the business and to share equally in the profits and losses; x , x that this partnership continued until about December 1, 1907, when the venture was mutually abandoned. Plaintiff also- claims that there has been no settlement or accounting between him and defendant, and that defendant has a large amount of money and some furniture belonging to the partnership, and he s(plaintiff) asks an accounting. Defendant’s answer was practically a general denial. The case was tried upon these issues, and the trial court found that there was no partnership, and that, if there had been one, according to plaintiff’s testimony, such an one would have been contrary to public policy. The petition was therefore dismissed. For appellant it is'contended that the trial court was in error in its finding of facts, that the contract of *710partnership was not contrary to public policy, and that, in any event, there was one deal in the transaction had while the partnership continued which was not in any manner affected by the alleged taint, and as to that plaintiff should have his share of the commission. Plaintiff and defendant at one' time lived in the village of Kussell, in Clarke County, and while there they entered into a copartnership arrangement for handling real estate in that town and vicinity. ■ By the terms of the agreement they occupied the same office, but each had his separate desk, stationery, etc., and to the outside world there was nothing to indicate a partnership, save that they occupied the same room. The avowed object of this was so that, as they say, they might handle both ends of the deal; that is to say, so that one might represent the buyer and the other the seller, each getting a commission which they were to pool or divide after the deal was closed. This partnership arrangement continued some five or six months, division and settlement of commissions being made from time to time, until the parties concluded to buy and conduct a clothing store in the town where they were operating, which was done, and this clothing business was conducted for some time. In the meantime defendant had moved to the. city of Osceola, where he opened a real estate office, having associated with him one Houston. Finally, and about April 10, 1907, plaintiff moved to Osceola with the intention of engaging in the real estate business. He met defendant, and, Houston being then away from home, he (defendant) proposed to plaintiff that if his former part-# ner, Houston, did not come back he (Fryer) should go into partnership with him (defendant). After waiting a few days, and it appearing to defendant that his relations to Houston were terminated, he proposed to plaintiff that he (plaintiff) come into his (defendant’s) office, and that they engage in the real estate business there in Osceola on the same terms as they had theretofore had at Kussell. *711Plaintiff accepted the offer, moved into defendant’s office, paid $6 for one-half of certain furniture which defendant proposed to sell, and it was agreed that each should pay one-half the office and other expenses, and that they should divide the commissions earned. Defendant excepted one deal he then had on hand, but all other matters were taken into the partnership, and plaintiff commenced to pay his part of the rent on May 1, 1907. From May 1st to about the first or middle of July three deals were made. In one plaintiff received $200 and defendant $275. In another defendant received $60 and plaintiff nothing, and in the third plaintiff received $280 and defendant $175. Expenses, etc., down to July 1, 1907, were settled; each putting in his separate expense, and defendant allowing plaintiff $30 of the- $60 commission. Thereafter plaintiff collected $481 on another deal and defendant $453. Thereafter defendant had what has been called the “Morton and Bosserman Bros, deal,” in which defendant, with the consent of both vendor and purchaser, represented both parties, collected $400 from one party and $200 from the other. In connection with this deal, plaintiff having nothing actively to do with it, defendant entered in an office book kept for that purpose an account of his expenses amounting to $35.15, and upon the same book plaintiff entered some of his office expenses after July 1st. Thereafter defendant had another deal, known as the second “Morton-Bosserman deal.” This last was about the middle of August, 1907. There is some doubt about this deal, but, as we understand it, defendant received $300 from one of the parties as commission. Thereafter there was a third and final deal known as the “Shenandoah light plant transaction.” This fell through, as we understand it; but defendant was paid $250 for his services in connection therewith. After July plaintiff was not in the office a great deal for the reason that he was then engaged in building a house for himself, and he did nothing much *712for the partnership, and, while he claims one-half the commission earned after July 1st, he has never been very insistent upon anything more than his share of the $600 earned on the first Morton-Bosserman Bros. deal.
Defendant denies that he ever entered into a partnership with plaintiff, although he admits the sharing of expenses and the division of commission while the parties were engaged in business both at Russell and at Osceola down to July 1, 1907. He says that there was a pool between them as to business where they represented both parties, which under the circumstances would clearly amount to a partnership as to these transactions, and that there was to be and in fact was no division of commissions where but one side was represented in the office. The testimony negatives this thought, however, for defendant did prior to July 1st divide a commission which he in fact earned representing but one side of the transaction. Moreover, in the first Morton-Bosserman deal in which defendant, with consent of the interested parties, represented both sides, defendant entered upon an expense book kept for that purpose his traveling and other expenses connected with that deal and some other expenses incurred prior thereto on another deal. The matter can not be explained upon any other theory than that of partnership. Defendant’s oral explanation thereof is not satisfactory. Each party has some corroborating testimony; plaintiff producing witnesses who testified to admissions of defendant that plaintiff was his partner, and defendant some who testified to admissions of plaintiff that he was not in partnership with defendant. There is also some testimony as to the acts apd conduct of each party which it is claimed tends to support the contention of each. As to these matters we may say that, although defendant argues an estoppel on plaintiff due to his admissions to third parties, the case lacks one of the essential elements of such an estoppel; that is to say, there is no showing that defendant knew of these *713declarations, or that he acted thereon to his prejudice. So that the element of estoppel is out of the case. We are constrained to hold that there was a partnership between these parties substantially as claimed by plaintiff. No other conclusion is consistent with the acts and conduct of the parties. We are also constrained to hold that plaintiff practically abandoned the partnership about August 1st, and when he asked for a settlement with defendant he made no claim, as we understand it, to anything more than his share of the first Morton-Bosserman deal.
2. Same: againstpubiie missions?”1" accounting. Our first inquiry of law is, then, assuming that such a partnership is established: Was it so inimical to public policy that plaintiff should be denied relief? It will be observed that no commission is now in con-troversy where these parties represented both sides °f the transaction out of which it grew, Tim defendant represented both parties of the Morton-Bosserman deal, but this was with consent of each party to the transaction and in such circumstances the commission was properly earned and became a legitimate asset of the firm, if there was a partnership. The two subsequent commissions were as free from taint as this first one. So that we may assume for the purposes of the case that the original contract of partnership was void as being contrary to public policy. Still, as to the three transactions last involved, there was no fraud, no double dealing, and nothing contrary either to law or public policy. • It is a fundamental rule of law that if there be a contract legal in part and illegal in part, and the legal can be settled without reference to the illegal, recovery may be had on the legal part thereof. Conceding then that the partnership was,. in so far as it contemplated the representation by the firm of both sides of a real estate transaction, illegal or contrary to public, policy, still this illegality would not affect transactions where the firm represented but one side and earned its commission lawfully. *714As to.this defendant can not be heard to say that, because it conducted other illegal transactions, he will withhold from plaintiff his share of the money lawfully and properly earned. Anderson v. Powell, 44 Iowa, 20; Central Trust Co. v. Respass, 112 Ky. 606 (66 S. W. 421, 56 L. R. A. 479, 99 Am. St. Rep. 317); Leekins v. Nordyke, 66 Iowa, 471.
3. agency: accounting. Let us for a moment see whether this transaction be such as to deprive plaintiff of his part of the commissions earned. It is a well-known rule of agency that an agent can not represent both parties — can not serve two masters. But this rule is for the pro-, . . _ • _ tection of the principals, and not for the
benefit of the general public. If the principals agree to it, that is the end of the transaction. The partnership, viewed in its worst aspect, was not to defraud the .public generally, but to take advantage of prospective customers who might or might not consent. Without consent commissions could not be collected from either party but with it could be collected from both. Leekins v. Nordyke, supra; Seymour v. Shea, 62 Iowa, 708; Norton v. Blinn, 39 Ohio St. 145. The commissions having been earned and collected and so far as now involved with the consent of both principals, the question of dual agency arises collaterally, and it should not be held a defense to plaintiff’s suit. Bibb v. Miller, 11 Bush (Ky.) 306; Brooks v. Martin, 2 Wall. 70 (17 L. Ed. 732). The Broolcs case last cited is closely in point on this proposition, and, as there pointed out there is a wide distinction between the enforcing of illegal contracts and asserting title ,t° money which has arisen from them. We quote the following from that case:
It is to have an account of these funds, and a division of these proceeds, that this bill is filed. Does it lie in the mouth of the partner who has, by fraudulent means, obtained possession and control of all these funds, to re*715fuse to do equity to Ms other partner, because of the wrong originally done or intended to the soldier? It is difficult to perceive how the statute, enacted for the benefit of the soldier, is to be rendered any more effective by leaving all this in the hands of Brooks, instead of requiring him to execute justice as between himself and his partner; or what rule of public morals will be weakened by compelling him to do so ? The title to the lands is not rendered void by the statute. It interposes no obstacles to the collection of the notes and mortgages. The transactions which were illegal have become accomplished facts, and can not be affected by any action of the court in this case.
AVe also quote the following from the opinion in Sharp v. Taylor, 2 Phillips Ch., 801:
The answer to the objection appears to me to be this: That the plaintiff does not ask to enforce any agreement adverse to tire provisions of the act of Parliament. He is not seeking compensation and payment for an illegal voyage. That matter was disposed of when Taylor (the defendant) received the money, and plaintiff is now only seeking payment for his share of the realized profits. As between these two, can this supposed evasion of the law be set up as a defense by one against the otherwise clear title of the other ? Can one of two partners possess himself of the property of the firm, and be permitted to retain it, if he can show that, in realizing it, some provision of some “act of Parliament has been violated or neglected? The answer to this, as to the former case, will be that the transaction alleged to be illegal is completed and' closed, and will not be in any manner affected by what the court is asked to do between the parties.
McBlair v. Gibbes, 17 How. 232 (15 L. Ed. 1321, is also in point, and contains an elaborate review of the authorities. AVe quote the following from the syllabus in that case: “If the fund be paid for the other party to a third person, the latter can not set up the illegality of the contract on which the payment has been made, and withhold it for himself, or, if paid to one of the parties, he *716can not withhold the share going to his associate.” See, also, Doyle v. Burns, 123 Iowa, 488; Buell v. Buckingham, 16 Iowa, 284; Harvey v. Varney, 98 Mass. 118.
We are impressed with the thought that, defendant having received the money for the 'partnership, he can not ■set up the illegality of the transactions with the landowners as a defense to an action for an accounting, but, however that may be, the transaction now involved — that is, the first Morton-Bosserman deal — is in no sense tainted. This legal transaction may be separated from the illegal, if there were any such, and recovery had thereon. The result of the whole matter is that defendant received $600 on this transaction for which he should account. He paid out $35.15 on account thereof, leaving $564.85, one-half of which is $282.42. Plaintiff confessedly had one-half of $27 more than his share in his possession on prior deals. One-half of this is $13.50, which, deducted from the $282.42, leaves $268.92, for which amount plaintiff should have had judgment, with interest from the time of the trial in the court below.
The case will be reversed for a decree in harmony with this opinion, or plaintiff at his option, exercised within twenty days, may have such a decree here. — Reversed and remanded.