BARTCH, J.
This action was commenced in the district court of Sanpete county on November 9, 1901, to recover from the defendant the sum of $290.35 and interest, alleged to be due on an implied contract of indemnity. It was alleged in the complaint, substantially, that, on October 4,1896, at Manti City, Sanpete county, Utah, the defendant constituted and appointed the plaintiff his agent, specially, to go to the city of Payson, Utah county, Utah,and take possession of, and bring to said Manti City, certain goods and chattels upon which the' defendant held a chattel mortgage; that afterwards on the 5th day of October, 1898, at said city of Payson, while he was acting in the capacity of agent for defendant as aforesaid, and at the special instance, request, and direction of defendant, the plaintiff took possession of said chattels and conveyed the same to said Manti City; that then, at Manti City, the defendant ratified the 'taking of the goods and chattels; that at the time they were so taken the plaintiff did not know that such taking was a tort, he acting in good faith as the agent of the defendant, and upon the faith of the representations and assurances of defendant that such taking was lawful and proper; that afterwards one S. S. Johnson instituted suit against the plaintiff in the district court of Utah county, and on the 2d day of March, 1899, recovered judgment against the plaintiff for the sum of $300, besides costs of suit, amounting to $13.90, all of which damages and costs were collected from him; that in addition thereto plaintiff was compelled to, and did, pay *446$50 to Ms attorney for defending Mm in that action, $12 reporter’s fees, and $47 for the transportation of the goods and chattels from the city of Payson to Manti City, all of which expenses were incident to said litigation ; that the defendant had due notice of the pendency of the action, the rendition of the judgment, and the collection thereof from plaintiff; that the judgment and said expenses and the payment thereof resulted from the taking of the goods and chattels; that the plaintiff and defendant were both domiciled in Manti City at the time of the institution of the agency, and at all times thereafter, up to and including the date upon wMch tMs suit was commenced; that plaintiff has at divers times demanded of defendant, at Manti City, payment of the damages and losses, and that the defendant every time, upon demand made, failed and refused to pay the same, or any part thereof, except $133.50, and still does refuse and fail to pay the damages and losses, by means whereof plaintiff has been injured in the sum of $290.35. For this sum, judgment was demanded. To this complaint the defendant interposed a demurrer, as follows: “ (1) That this court has no jurisdiction of the subject-matter ■of said action, in this: That, if any cause of action exists in favor of said plaintiff and against said defendant, that said cause of action arose in Utah county, State of Utah, and not in Sanpete county, or anywhere'witMn the jurisdiction of this court. (2) That said complaint does not state facts sufficient to constitute a cause of action.” Upon the hearing of the demufrer, the court decided against the plaintiff upon both grounds, and dismissed the action.
"We will, in the first instance, consider the question whether the complaint states a cause of action. The appellant insists that facts sufficient are stated to 1 constitute a case for indemnity, within the exceptions to the rule refusing indemnity between joint tort-feasors. For the purpose of this decision, the judgment appealed from having been rendered upon demurrer, the facts alleged in the complaint must be assumed to *447be true. Therefrom it appears that the defendant appointed the plaintiff as his agent for the purpose of transacting certain specific business, which was to take into possession certain goods and chattels, and transport them to a particular place named. The agent proceeded to, and did, transact the business of the agency at the special instance and under the direction of his principal; and, although the goods. and chattels were covered by a mortgage held by the principal, the agent was not aware that the taking and carrying away of them as directed by the principal constituted a tort. He, as appears, acted in good faith, and upon the faith •of the representations and assurances of the principal that such taking was lawful and proper. Thereafter a third person brought suit against the agent for the goods and chattels, and recovered judgment against him for a considerable sum, which sum the agent was compelled to, and did, pay, together with the expenses incurred in the defense of the suit. The principal was aware of that litigation and of the payment of the resulting judgment and expenses, but, upon demand made by the agent for reimbursement, refused to comply with the demand. "While some of the allegations showing these facts may be subject to the criticism of being indefinite and uncertain, and might be vulnerable to a specific plea, we apprehend the ultimate facts are sufficiently alleged .to withstand a general demurrer. If the ■allegations are in fact true, the plaintiff has a right of •recovery. The facts stated are such as to characterize the case as an exception to the rule of law that tort feasors or wrongdoers can not have redress against each other. That rule applies to cases where he who seeks redress knew or must be presumed to have known that the transaction which resulted in the damages he was compelled to pay was tortious and unlawful. But where, as appears from the allegations in this case, an agent acts in good faith for his principal, under the principal’s direction, and relies upon his representations that the transaction is lawful, and the same is not mani*448festly unlawful, the law implies indemnity, for damages of third parties, to the agent from the principal; and if, as the result of acts so performed, the ag'ent is mulcted in damages,, the principal must respond to the agent for the same, as well as for the necessary expenses incurred in resisting the claims of third parties who were injured by the transaction. ‘ ‘ The agent has the right to assume that the principal will not call upon him to perform any duty which would, render him liable in damages to third persons. Having no personal interest in the act, other than the performance of his duty, the agent should not he required to suffer loss from the doing of an act apparently lawful in itself, and which he has undertaken to do' by the direction and for the benefit and advantage of his principal. If- in the performance of such an act, therefore, the agent invades the rights of third persons, and incurs liability to them, the loss should fall rather upon him for whose benefit and by whose direction it was done, than upon Mm whose only intention was to do Ms duty to his principal. "Wherever, then, the agent is called upon by his principal to do an act which is not manifestly illegal, and which he does not know to be wrong, the law implies a promise on the part of the principal to indemnify the agent for such losses and damages as flow directly and immediately from, the execution of the agency. Thus an agent is entitled to be indemmfied when he is compelled to pay damages for taking personal property by direction of his principal, which, though claimed adversely by another, he has reasonable ground to believe to belong to his principal.” Mechem on Agency, sec. 653. In Story on Agency, sec. 339, the author says: “It may be stated, as a general principal of law, that an agent who commits a trespass or other wrong to the property of a tMrd person by the direction of his principal, if at the time he has no knowledge , or suspicion that it is such a trespass or wrong, but acts bona fide, will be entitled to a reimbursement and contribution from Ms principal for all the damages which he sustains there*449by. For, although the g’eneral doctrine of the common law is that there can he no reimbursement or contribution among wrongdoers, whether they are principals or are agents, yet that doctrine is to be received with the qualification that the parties know at the time that it is a wrong. And in all these cases there is no difference whether there be a promise of indemnity or not, for the law will not enforce a contract of indemnity against a known and meditated wrong; and, on the other hand, where the agent acts innocently and- without, notice of the wrong, the law will imply a promise on the part of the principal to indemnify him. The same doctrine applies to all other cases of losses or damages sustained by an agent in the course of the business of his agency, if they are incurred without any negligence or default • on his own part.” In Jacobs v. Pollard, 10 Cush. 287, 57 Am. Dec. 105, Mr. Justice Bigelow said: “It is undoubtedly the policy of the law to discountenance all actions in which a party seeks tti enforce a demand originating in a willful breach or violation on his part of the legal rights of others. Courts of law will not lend their aid to those who found their claims upon an illegal transaction. No one can be permitted to relieve himself from the consequences of having intentionally committed an unlawful act by seeking an indemnity or contribution from those with whom or by whose authority such unlawful act was committed. But justice and sound policy, upon which this salutary rule is founded, alike require that it should .not be extended to cases where parties have acted in good faith, without any unlawful design, or for the purpose of asserting a right in themselves or others, although they may have"thereby infringed upon the legal rights of third persons. It is only'where a person knows, or must be presumed to know, that his act was unlawful, that the law will refuse to aid him in seeking an indemnity or contribution.” So, in Moore v. Appleton, 26 Ala. 633, Mr. Justice Eice, speaking for the court, said: “We admit *450the rule that the law will not enforce contribution nor indemnity between wrongdoers. But that rule does not apply to any case where the act of the agent was not manifestly illegal in itself, and was done bona Me in the execution of his agency, and without knowledge (either actual or implied by law) that it was illegal.” Story on Agency, sec. 340; Cooley on Torts, 145-149; Culmer v. Wilson, 13 Utah 129, 44 Pac. 833, 57 Am. St. Rep. 713; Nelson v. Cook, 17 Ill. 443; Gower v. Emery, 18 Me. 79; Avery v. Halsey, 14 Pick. 174; Coventry v. Barton, 17 Johns. 142, 8 Am. Dec. 376; 1 Moore v. Appleton (Ala.), 73 Am. Dec. 448. From the forégoing considerations, we are of the opinion that the complaint is not subject to demurrer on the ground that it stated no cause of action.
The respondent also contends that the suit was not brought in the proper county. This contention is not tenable, in view of the facts appearing upon the 2 face of the complaint. Both parties resided in San-pete county, where the suit was commenced. The agency was constituted and the relations of principal and agent created there. By direction of the principal the goods and chattels were taken into that county, and there he accepted them and ratified the acts of the agent. So the breach of the implied promise of indemnity occurred in that county, when, upon demand therefor, the principal refused to pay the damages which resulted to the agent because of the agency. It will thus be observed that the main facts which enter into the agent’s cause of action arose in Sanpete county, and therefore'' the action was properly instituted in that county.
We are of the opinion that the court erred in sustaining the demurrer. The judgment must be reversed, with costs, and the cause remanded, with directions to the court below to reinstate the case,.overrule the demurrer, and proceed according to law. It is so ordered.
MoCARTY, J., concurs.