A Utah man pleaded guilty Monday to trying to kidnap a young girl from her bedroom in an attempt thwarted by the child's father.

Troy Morley entered his plea to one count of child kidnapping in an agreement with prosecutors that dismissed three other charges — burglary, criminal trespassing and interference with an arresting officer.

Morley is accused of sneaking into a house in the Salt Lake City suburb of Sandy early Nov. 7, 2014, and taking the 5-year-old girl from her room. He picked her up and tried to walk out the front door, but the sound woke her parents, prosecutors said.

Stephanie and Aaron Edson were especially concerned when they heard her voice because their daughter has cerebral palsy and physical limitations that make it difficult for her to walk out of her room alone.

Aaron Edson followed Morley outside and calmly asked him to give the girl back.

Morley handed her over and left, saying he needed to go to a church and to call the FBI if anything happened to him. After his arrest a few blocks away, Morley rambled about drug cartels, the FBI and voices coming from a radio, police said.

He was arrested a few blocks away. His lawyer, Roger Kraft, has said that Morley's mental health likely won't be an issue in the case.

Before the incident, he had stopped at a hotel in Sandy on his way back from Nevada because he was tired. When he left, Morley started walking around the neighborhood where the girl lives with her parents, prosecutors said.

Morley's father, Gary Stokes, has said his son was slipped unidentified drugs at the hotel and didn't know what he was doing when authorities say he tried to take the child.