A Prince George’s County man has pleaded guilty to beating an 72-year-old resident with a baseball bat last fall when he refused to give up his wallet during an early morning robbery attempt at a county bus stop.

Edwin Gonzalez, 20, of Colmar Manor, will likely face a prison term of a decade or more under the plea deal. A trial on attempted murder charges had been scheduled for this week.

Police say Gonzalez pulled a knife on the 72-year-old man while he was waiting for a bus in the 3800 block of Bladensburg Road early on the morning of Sept. 15, 2012.

After the 72-year-old refused to hand over his wallet, the would-be robber left and returned with an aluminum baseball bat, severely beating the victim until a passerby yelled for help.

Gonzalez was not the original suspect in the case. The victim initially identified a Mount Rainier man in a photo lineup. But authorities said a subsequent tip led them to charge Gonzalez instead.

Gonzalez’s attorney this week sought to quash evidence from an interview with police, saying the 20-year-old had been questioned aggressively by officers while handcuffed to an interrogation table after he was read his Miranda rights.

Prince George’s County Circuit Court Judge Dwight D. Jackson denied the motion to suppress the evidence. Gonzalez agreed to a plea deal thereafter.

Under the terms of the deal, Gonzalez pleaded guilty to first degree assault. Sentencing guidelines for the crime range from 8 years to 13 years, but the defense has agreed to ask for no less than 10 years. And State’s Attorney Angela Alsobrooks will cap her recommended sentence at 15 years. Sentencing is scheduled for August.