The learned trial court, in making disposition of the issue of law raised by the demurrer, seems to have based its conclusion upon the ground that the complaint did not plead an equitable cause of action, for the reason that the plaintiff had no lien upon the fund in his hands and also because he had an adequate remedy at law, and, further, that the complaint could not be sustained as an action at law to recover for services rendered without disregarding the substantial averments of the complaint and the prayer for relief. It is not necessary in support of the conclusion at which we have arrived to determine whether the averments of the complaint, coupled with the prayer for relief, state a legal cause of action or not. Nor is it abso*74lutely essential to the maintenance of an equitable action for the relief demanded in this'complaint that there should exist a lien upon the fund in plaintiff’s hands. It is clear, from the averments of' the complaint, that the plaintiff has established that there existed-between himself and the defendants the relation of principal and agent of such a character as constituted the plaintiff- a quasi trustee for the defendants, and such relation, within the doctrine announced in Marvin v. Brooks (91 N. Y. 71), would have entitled the defendants to maintain an equitable action to procure an accounting of - the plaintiff’s acts in dealing with the trust funds intrusted to his care and management. While it is true that the existence of á bare agency is not sufficient upon which the equitable jurisdiction of the court can be invoked, yet where the agent’s duties are fiduciary in character and involve a dealing with trust funds, lie is regarded in -the law as a quasi trustee and may be called to account in a court of equity for his management of the trust fund, and in such action judgment may pass determining the respective rights and liabilities of the parties thereto and adjusting the respective interests of the parties in and to the trust fund. In the present case, the complaint avers in terms that the plaintiff acted for the defendants as agent, factor and manager, and this averment is accompanied by facts showing wherein and how he managed the estate of the defendants; that from time to time he rendered to them accounts of the conduct of the business and from time to time paid over money to the defendants arising out of such business, and that there has never been a final settlement and adjustment of accounts between the parties; that in the course of such business the plaintiff has advanced money for expenses connected with his management of the defendants’ property for which he has not been paid, and that the reasonable value of his. services is a specified sum which he asks to be-allowed. The authority which we have cited is clearly decisive of the proposition that the defendants' could maintain an equitable action for an accounting based upon these facts. If the defendants could maintain such an action, -then it must follow . that the plaintiff has the reciprocal right to also maintain an action for the same purpose, as it would be clearly obnoxious to every principle of equity to hold that one party might invoke the aid of equity and that the other could not, although the rights and liabiL. *75ities of each were governed by and arose out of the same transaction. It is quite evident that the complaint is inartiiicially drawn, but such fact does not. defeat the plaintiff’s rights in the premises and furnishes no ground for a demurrer to his complaint. Enough appears to show the right to the equitable interposition of the court and this is sufficient to resist the demurrer. ( Wetmore v. Porter, 92 N. Y. 76.)
We are also of opinion that sufficient facts are alleged in this complaint' to establish a lien in favor of the plaintiff upon the fund in question, at least to the extent of his claim for expenses and disbursements paid out by the plaintiff in its management. In Muller v. Pondir (55 N. Y. 325) it was said by. Judge Allen : “ An agent may have a lien on the property or funds of his principal for moneys advanced or liabilities incurred in his behalf; and if moneys have been advanced or liabilities incurred upon the faith of the solvency of the principal, and he becomes insolvent while the proceeds and fruit of such advances or liability are in the possession of the agent or within his reach, and before they have come to the actual possession of the principal, within every principle of equity the agent has a lien upon the same for his protection and indemnity. If necessary to his protection, the plaintiff would have been permitted to repudiate the agency and assume that position" which would best protect himself from loss by reason of the insolvency of his principal.” The evident reason why the lien is given is that by the expenditure made and liabilities assumed the agent has benefited the principal, protected the fund, oz*, at least, improved the principal’s condition. As the irresponsibility of the principal would defeat the right of the agent in securing reimbursement, equity raises out of such situation for his protection a lien upon the fund. It must follow, therefore, that whenever a condition exists which would cause loss to the agent, if he parted with the funds in his hands, equity will interpose so far as to protect the agent’s right in the premises and raise out of the condition a lien upon the fund. The complaint -avers that the defendants are residents of England, and that if the plaintiff parts with the possession of the money it will be removed beyond the jurisdiction of the court and its process. In such case, the same reasons exist for supporting a lien upon the fund as wozzld exist in the case of insolvency. It seems eleai’, therefore, that *76this complaint states a perfectly good cause of action for equitable interposition.-
It follows that both the final and interlocutory judgments should be reversed, with costs to the plaintiff in this court and in the court below, and leave given to the defendants to answer within twenty days upon the payment of such costs.
O’Brien, Ingraham and McLaughlin, JJ., concurred; Van Brunt, P. J., concurred on first ground stated in opinion.
Judgments reversed, with costs in this court and in the court below, with leave to the defendants to answer within twenty days on payment of such costs.