LEAVENWORTH — A Leavenworth man has pleaded guilty to burglary after he apparently dropped his wallet at the scene of the crime, according to a prosecution official.

Mark D. Beaman, 24, pleaded guilty Friday in Leavenworth County District court to aggravated burglary.

The charge stemmed from an April 2018 incident in which someone reportedly knocked on the door of a rural Basehor home.

A man who was home at the time decided not to answer the door. The resident looked out a window and saw a man in a long-sleeve shirt, according to a news release from County Attorney Todd Thompson.

A few minutes later, the resident heard more knocking at the back of his house.

Still not wanting to answer his door, the resident walked into a bedroom. A few minutes later, he walked into a hallway. The resident saw another person in the hallway. The suspect wore a mask and a long-sleeve shirt.

The resident began yelling, and the suspect ran out of the house, Thompson said.

A couple of days later, the victim found a wallet in his driveway. The wallet contained identification cards for Beaman. And the victim identified Beaman as the man he saw knocking on his door the night of the burglary.

Beaman initially pleaded no contest to the aggravated burglary charge. But he later requested to withdraw the plea and plead guilty as a way of showing that he is taking responsibility for the crime. His attorney, James Colgan, has filed a motion seeking probation instead of a prison sentence.

The prosecution objected to the defendant changing the plea, arguing that he had not shown good cause.

District Judge Michael Gibbens ruled Friday that Beaman could change his plea, and the judge accepted the guilty plea.

Sentencing is scheduled for Aug. 2.