A Richfield man who admitted to sexually assaulting a friend's 4-year-old daughter last year was sentenced Wednesday to 12 years in prison.

Edgar Rafael Morales, 22, who said nothing before sentencing in Hennepin County District Court, reached a deal with prosecutors in which he agreed to plead guilty to first-degree criminal sexual conduct for the December 2011 assault.

According to charges, Morales was invited to stay at the Minneapolis home where the girl lived after he had been drinking with her father that evening.

The girl's grandmother heard her cry and went to the bedroom, where she saw Morales leaving. The girl appeared to have been sexually assaulted, and physical evidence implicated Morales in the crime.

At sentencing, Morales' attorney, Paul Edlund, said that although Morales admitted that the evidence points toward his guilt, he did not remember assaulting the girl because of how much he drank that night.

"This action is so out of character for how he has lived his life," Edlund said, adding that Morales blamed problems with drugs and alcohol for what happened.

In a written victim impact statement, the girl's mother asked District Judge Robert Small to give Morales more than a 12-year sentence, saying, "I would do anything to see him rot in jail."

Small said that he was bound by sentencing guidelines and a negotiated sentence as a result of the plea deal.