A 32-year-old man has pleaded guilty to invading the southeastern Minnesota home of a woman he knew and repeatedly raping her while trying to conceal his identity behind a mask.

Zane R. Pederson of Spicer, Minn., admitted to one count of first-degree criminal sexual conduct in connection with the many hours of terror the woman endured in her St. Charles home one night two years ago with her child in a nearby room.

In concert with that plea entered Friday in Winona County District Court, he also admitted to breaking into the woman's home during the previous two nights to look for her cellphone and to steal photos.

The plea agreement calls for Pederson to serve nearly 21 years in prison followed by 10 years of supervised release and also register with the state as a predatory offender.

In exchange for his guilty pleas, 17 other counts related to the rape case and one tied to the burglary case will be dismissed. Pederson remains jailed in lieu of $2 million bail; sentencing is set for Feb. 10 before Judge Mary Leahy.

While the woman did not know who her attacker was during the series of rapes, "this is a person known to our victim, but we can't give out more detail than that" in order to protect her identity, sheriff's investigator Mark Dungy said during a news conference held 3½ months later, when Pederson was arrested and charged.

About a month after terrorizing the woman, Pederson sexually assaulted a client at a disability care center where he worked in Willmar, Minn., according to criminal sexual conduct charges filed in connection with the Christmas Day incident. Two days later, Pederson denied sexually assaulting the man. The case is pending.