
292 N.W.2d 12 (1980)
In Re the Marriage of Pamela Kay SIMONSON, petitioner, Respondent,
v.
Dennis James SIMONSON, Appellant.
No. 50278.
Supreme Court of Minnesota.
April 18, 1980.
Rehearing Denied May 13, 1980.
Charles James Suk, Rochester, for respondent.
Richardson & Richardson, Austin, for appellant.
Considered and decided by the court without oral argument.
*13 OTIS, Justice.
The narrow issue in this appeal is whether or not it is in the best interests of a minor child to be in the custody of a mother who is cohabiting with a person who has a record of sexually molesting children. A divided panel of the district court affirmed an award of custody to the mother by a county court. We reverse.
On June 19, 1978, the County Court of Olmsted County dissolved the marriage of the respondent Pamela Kay Simonson and the appellant Donnie James Simonson. In granting custody to the mother, the trial court expressed its concern regarding her relationship with one John Diesman who was described by the court as not being "a character of good reputation." On appeal to the district court, Judge O. Russell Olson was of the opinion that both parties were "clearly qualified parents." He took note of the county court's misgivings as to respondent's relationship with Diesman but gave deference to the findings of the trial judge in what he characterized as an "extremely close custody issue." Judge Daniel F. Foley concurred in that decision only because the trial court retained continuing jurisdiction over the child's welfare and custody. However, he entertained the same doubts expressed by Judge Olson and the county court.
Judge Glenn E. Kelley dissented, observing, "While it is obvious the trial court was extremely troubled by this difficult decision, in my view the question is not as close as the trial court indicated or as this Court affirmed. To put this child in a setting where [he] will have contact with respondent's paramour  a man convicted of at least two sexual offenses against girls and women and charged with others  was a clear abuse of discretion."
The child whose custody is here in issue is a boy, Cory James Simonson, born May 2, 1976, now almost four years of age. Because both parents have otherwise been found fit to have custody, the impact on this child of the mother's relationship with a convicted felon has seriously troubled all four of the judges who have considered the matter. The record discloses that Diesman has been convicted of at least six felonies since 1958, one or more of which were for carnal knowledge. He has been committed to prison for one of the felonies. In addition, his first wife by affidavit has charged that Diesman sexually molested his own daughter as well as a niece, charges which have not been denied in these proceedings.
The record indicates that at the time of trial Mrs. Simonson was maintaining an intimate relationship with Diesman, and that her son, Cory, was frequently exposed to this association while in his mother's custody. Under these circumstances, we are of the opinion and hold that it was clearly not in the best interests of this three-year-old child to remain in the respondent's home. We find support for our decision in Minn.Stat. § 518.18(c) (1978), which authorizes a change in custody where "the child's present environment may endanger his physical or emotional health or impair his emotional development," and Minn.Stat. § 518.17, subd. 1(c) (1978), which includes as a relevant factor in considering custody "The interaction and interrelationship of the child with his parent or parents, his siblings, and any other person who may significantly affect the child's best interests." Accordingly the judgment of the district court is reversed and the matter is remanded to the County Court of Olmsted County for a further hearing with respect to the present relationship between the respondent Pamela Simonson and John Diesman. Custody of Cory James Simonson will be granted to the appellant Donnie James Simonson, until and unless the trial court finds the respondent has terminated her relationship with Diesman, in which event the trial court may again review the matter of custody. Upon such a review that court shall take into account the length of time during which appellant has had custody as well as all the other circumstances that might affect the decision then to be made. Any visitation rights accorded the respondent Pamela Simonson shall specify that they may be exercised only when she is not in the company of Diesman.
Reversed and remanded.
