This was an action on the equity side of the court, for' a decree declaring the plaintiff to be the owner of certain real estate situated in Hanson county, and that the title to ,said premises, held by the defendant Wheeler, be adjudged to be held in trust for the plaintiff, and the said Wheeler be required to convey the same to the -plaintiff. Judgment for the plaintiff, and defendants appeal.
The defendants ask for a reversal of this judgment principally on two grounds, the first of which ip that the court *410erred in admitting'evidence under the cómplaint, for the reason that the complaint did not state facts sufficient to constitute a cause of action; and, second, for the reason that, under the findings, the judgment should have been in favor of the defendants.
The plaintiff, in his complaint, set forth that in 1887 he made a loan of $1,200 to one Crosby and wife, through defendant F. T. Day, who acted as his agent in making said loan, and that a note and mortgage was taken from said Crosby and wife to the plaintiff; that subsequently said Day foreclosed the said mortgage as the agent of the plaintiff, by advertisement, defendant Grigsby acting as the attorney in such foreclosure proceedings; that, on the sale of said property, the same was bid in, in the name of F. T. Day, who subsequently transferred the same to the defendant Wheeler, and . the said Grigsby and Wheeler had notice of the fact that said Day was the agent acting for and on behalf of the plaintiff. The plaintiff alleged,, in addition to the foregoing facts, “that, while acting in said capacity as agent of the plaintiff, the said F. T. Day, with the intent to wrong and defraud the plaintiff, conspired and connived with divers parties, among whom was Melvin Grigsby,one of the defendants herein, for the purpose of using such loan and mortgage as a means of making unlawful gains and profits for themselves.” Other fraudulent acts were alleged on the part of said Day and Grigsby in the foreclosure of said mortgage in taking a conveyance of the same to said Day. The defendants therefore contend that, as a result of the allegations of fraud, there was no foreclosure of plaintiff’s mortgage binding upon said plaintiff, and that he still retains the title to his said note and mortgage, which he can proceed to *411foreclose without regard to the former foreclosure proceedings. But. under all the allegations of the complaint, we are of the opinion that this contention is not tenable.
It clearly appears from the complaint that Day was authorized by plaintiff, if he deemed it necessary, to proceed and foreclose the mortgage in question, and that the same was regularly foreclosed. The only ground that plaintiff relies on as constituting any fraud in the transaction was the bidding in of the property at the sale in the name of said Day, instead of that of the plaintiff. The plaintiff in effect affirms the foreclosure proceedings, and insists that the said Day held the title to said property as trustee for the plaintiff, and that Wheeler, taking the title from Day, with notice of all the facts, also holds the same as trustee for the plaintiff. The case is not ruled by that of Wylly v. Grigsby, 10 S. D. 13, 70 N. W. 1049, for the reason that in that case the acts of the agent were in direct violation of the instructions of the plaintiff, were entirely unauthorized, and held to be utterly void as against the plaintiff. But in the case at bar the defendant Day was fully authorized, as the agent' of the plaintiff, to foreclose the mortgage, sell the property thereunder, and take a deed thereto in the name of the plaintiff; and the fact that he took the deed in his own name, instead of that of the plaintiff, constituted him a trustee of the plaintiff, who is thereby entitled to the relief demanded in the complaint, in connection with the other facts therein alleged. The trial court therefore ruled correctly in admitting evidence under the complaint.
The referee, in his findings, finds there was no actual fraud upon the part of Day or Grigsby, and that the title to the property was taken in the name of Day as matter of convenience. Un *412der this finding, the defendants contend that they were entitled to judgment for the reason that the material issue in the case was found in their favor, viz. the issue of actual fraud on the part of Day and Grigsby. But, in our view of the case, the allegations of actual fraud on the part of Day and Grigsby were not essential to plaintiff’s right to maintain the action. The allegations of conspiracy on the part of Day and Grigsby of an intent to defraud the plaintiff by making unlawful gains and profits for themselves in the foreclosure of said mortgage, and the concealing of the facts of such foreclosure, seem to us to have been entirely unnecessary, and may properly be eliminated from the complaint without affecting plaintiff’s cause of action.
The plaintiff’s right to recover rests upon the fact that Day, as his agent, and while acting in a fiduciary capacity in the management and foreclosure of said mortgagé, took the title to the property in himself, instead of that of his principal. This constituted said Day a trustee of plaintiff, as his acts were ■in violation of his duties as such agent, and brings the defendants clearly within the provisions of Sections 3915 and 3920, Comp. Laws, which read as follows:
“Sec. 3915. Every one who voluntarily assumes a relation of personal confidence with another, is deemed a trustee within the meaning of this chapter, not only as to the person who reposes such confidence, but also as to all persons of whose affairs he thus acquires information which was given to such person, in the like confidence, or over whose affairs he, by' such confidence, obtains any control. ” <
“Sec. 3920. One who gains a thing by fraud, accident, mistake, undue influence, the violation of a trust, or other wrongful act, is, unless he has some other and better right *413thereto, an involuntary trustee _ of the thing gained, for the benefit of the person who would otherwise have had it.”
These sections are copies of Sections 1171 and 1176 of the proposed Civil Code of New York; and that agents come within the provisions of the sections is clear from the decisions cited by the commissioners appointed to prepare that Code. Gardner v. Ogden, 22 N. Y. 343; Moore v. Moore, 5 N. Y. 256; Anderson v. Lemon, 8 N. Y. 236. It not being necessary, therefore, to make these allegations as to actual fraud, they may be entirely disregarded.
The learned counsel for appellants insist that the finding that there was no actual fraud on the part of Day and Grigsby would prevent the plaintiff from recovering in this action, because, under the complaint as drawn, the action was one in tort; but, by the findings of the referee, the plaintiff is enabled to recover in an action ex contractu. . However, this is not an action in tort, but one in equity, in which certain allegations of actual fraud are alleged under the theory of the pleader that such allegations were necessary to entitle’ the plaintiff to recover. Under the provisions of the Code, the allegations of the complaint are clearly sufficient to constitute a good cause of action, independently of the allegations as to actual fraud. Griffith v. Hubbard, 67 N. W. 851, 9 S. D. 15; Ricketts’ Appeal (Pa. Sup.) 12 Atl. 60; Danzeisen’s Appeal, 73 Pa. St. 65; Slemmer’s Appeal, 58 Pa. St. 167; Wilhelm’s Appeal, 79 Pa. St. 120; Graham v. Berryman, 19 N. J. Eq. 34; Byxbie v. Wood, 24 N. Y. 607; Conaughty v. Nichols, 42 N. Y. 83; Miller v. Hirschberg (Or.) 37 Pac. 85; Railway Co. v. Rubenstein (Colo. App.) 38 Pac. 76.
Id was the duty of Day, as the agent of plaintiff, to have taken a deed to the property in the name of his principal; and *414liis failure to do so was a constructive fraud, even though he may have intended no actual fraud upon the plaintiff. The title, therefore, to the property, though taken in the name of Day, must be regarded as taken for the benefit of the plaintiff, and held by Day in trust for him. Wheeler, taking with notice of these facts, occupies no better position than Day. The findings and judgment of the circuit court were therefore cor-, rect, and the judgment is affirmed.