
134 N.J. Super. 466 (1975)
341 A.2d 691
JANIS E. HIRSCH AND CAROL E. HIRSCH BIDWELL, PLAINTIFFS-APPELLANTS,
v.
TRAVELERS INSURANCE COMPANY, ET ALS, DEFENDANTS-RESPONDENTS.
Superior Court of New Jersey, Appellate Division.
Submitted June 9, 1975.
Decided June 17, 1975.
*468 Before Judges LEONARD, SEIDMAN and BISCHOFF.
Mr. Samuel Leventhal, attorney for appellants.
Messrs. Markowitz and Zindler, attorneys for respondent Doris Hirsch (Mr. Joseph Markowitz on the brief).
PER CURIAM.
Plaintiffs appeal from a judgment dismissing their complaint as to defendant Doris Hirsch, upon whose property they attempt to impose a constructive trust.
Jack M. Hirsch and Shirley Hirsch, the natural parents of plaintiffs, were divorced on March 10, 1967. The property settlement agreement, incorporated into a judgment nisi, provided that Jack Hirsch would designate plaintiffs as irrevocable beneficiaries of seven life insurance policies having a total face value of $98,000, pay the premiums thereon and direct the insurance companies to notify plaintiffs if any premiums were in default. The agreement further provided that Jack Hirsch would place certain securities in trust for plaintiffs' education, and an appropriate trust instrument was executed.
*469 After his divorce from Shirley Hirsch, Jack Hirsch married defendant Doris Hirsch. He died testate on January 18, 1973. Plaintiffs allege that shortly thereafter they discovered that Jack Hirsch violated the property settlement agreement by (1) depriving plaintiffs, by various means[1], of their rights as beneficiaries under the insurance policies, and (2) selling the securities held in trust for plaintiffs and converting the proceeds to another use. Plaintiffs allege that Jack Hirsch used the proceeds of these wrongful acts to finance the purchase of land and the construction of a $200,000 house on it, title of the land and property being placed in the names of decedent and Doris Hirsch as tenants by the entireties.
Plaintiffs filed a complaint naming as defendants: (1) the insurance companies (2) the executors of Jack Hirsch's estate and (3) Doris Hirsch. As to defendant Doris Hirsch, plaintiffs sought to impose a constructive trust on the above-mentioned real property for their benefit.
Doris Hirsch filed a motion to dismiss the complaint as to her for failure to state a claim upon which relief could be granted. The trial judge held that Doris Hirsch had not been unjustly enriched by Jack Hirsch's wrongful actions and that a constructive trust was not available to plaintiffs. The motion of Doris Hirsch to dismiss was accordingly granted.
We reverse.
On a motion to dismiss a complaint for failure to state a claim upon which relief can be granted, all facts alleged in the complaint and legitimate inferences drawn therefrom are deemed admitted. See Heavner v. Uniroyal, Inc., 63 N.J. 130, 133 (1973); J.H. Becker, Inc. v. Marlboro Tp., 82 N.J. Super. 519, 524 (App. Div. 1964).
*470 The following facts and legitimate inferences appear from an examination of the complaint: (1) funds were wrongfully diverted from the insurance policies and from trust funds by decedent; (2) monies thus diverted were used in the purchase of land and construction of the home in question, and (3) Doris Hirsch paid no consideration for her tenancy by the entirety which has now, by the death of her husband, resulted in her sole ownership of the property.
It is fundamental that a constructive trust should be impressed in any case where failure to do so would result in unjust enrichment. D'Ippolito v. Castoro, 51 N.J. 584, 588 (1968). All that is required to establish a constructive trust is a finding that there was a wrongful act resulting in the transfer of property and consequent unjust enrichment of another. Id. at 589. See also In re Mid-Center Redevelopment Corp., 383 F. Supp. 954, 971-973 (D.N.J. 1974); Restatement, Restitution, § 160 at 640 (1937).
The complaint alleges a wrongful diversion of trust funds resulting in the unjust enrichment of Doris Hirsch. It is clear that the facts alleged, if proven, establish her enrichment. The troublesome issue is whether this enrichment may be considered unjust so as to give rise to a cause of action against her.
One receiving a benefit is liable to make restitution only if the circumstances of its receipt or retention are such that, as between two contestants, it would be unjust for the recipient to retain the benefit. Restatement, Restitution, § 1 at 12 (1937); cf. Brick Tp. v. Vannell, 55 N.J. Super. 583, 595 (App. Div. 1959).
Where two innocent parties are involved and the recipient of a wrongful transfer is a bona fide purchaser for value, the recipient will prevail over one seeking to impose a constructive trust. Restatement, Restitution, § 172 at 691 (1937); 5 Scott, Trusts (3 ed. 1967), § 474 at 3454; cf. Bajek v. Polack, 120 N.J. Eq. 104, 107-108 (Ch. 1936). On the other hand, where the recipient is a gratuitous transferee, she holds the property subject to the equitable rights *471 of the wronged party and a constructive trust can be impressed. Restatement, Restitution, § 168 at 684 (1937); 5 Scott, op. cit., §§ 470, 510 at 3444, 3595.
Where a wrongdoer obtains funds at the expense of another and acquires other property with those funds, and then transfers the other property gratuitously to a third person, if the wronged party can "trace" the funds, he is entitled to reach the property and impose a constructive trust or an equitable lien on the property. Restatement, Restitution, § 202, comment (f) at 822 (1973); 5 Scott, op. cit., § 514.1 at 3605. In Golden v. Glens Falls Indemnity Co., 148 F. Supp. 41 (D.D.C. 1957), aff'd 250 F.2d 769 (D.C. Cir.1957), the court held that where a husband used funds, wrongfully obtained to purchase real estate, the funds could be traced to and a lien placed on the real estate now held by the wife where it had been held as tenants by the entireties and the wife obtained full title when her husband died.
Application of these principles to the complaint leads to the conclusion that plaintiffs have stated a cause of action against Doris Hirsch and that the complaint against her was wrongfully dismissed. Plaintiffs were beneficiaries of the insurance policies and the trust and had an equitable interest in the trust property and in the proceeds of the insurance policies. The complaint alleges that plaintiffs have an equitable interest in the real estate purchased with the wrongfully diverted funds. Giving plaintiffs the benefit of all favorable inferences it cannot be said, as a matter of law, that defendant Doris Hirsch is a bona fide purchaser; she may be a gratuitous transferee and may have taken title to the property subject to the equitable interest of plaintiffs. Marriage itself has been considered value, so as to make the wife a bona fide purchaser, only where the marriage is in consideration of the transfer of the property. 4 Scott, op. cit., § 298.2 at 2431. In the limited record before us there is no indication that this is the case here.
Reversed and remanded. We do not retain jurisdiction.
NOTES
[1]  Jack Hirsch allegedly manipulated the insurance policies as follows: changed the beneficiary to Doris Hirsch on some policies; borrowed money on several of the policies; reduced the face amount of several policies to paid-up policies and discontinued paying premiums on them.
