A Colorado Springs man will serve 27 years in prison after pleading guilty in the stabbing death of a homeless man.

James Henry Bratt on Tuesday pleaded guilty to attempted first-degree murder in the death of James Bidgood, whose body was discovered May 30 by a fellow homeless person in a vacant lot off South Nevada Ave.

Bratt, 37, was arrested after his girlfriend told police that he admitted being involved, claiming self-defense. Police reported in an arrest affidavit that Bratt had a cut on his knee and a possible puncture wound in the thigh.

The Colorado Springs police Homeless Outreach Team had worked for three years to get the victim off the streets, police said after the attack.

Prosecutors agreed to toss first-degree murder charges in exchange for Bratt’s guilty plea and his agreement to serve 27 years in prison. He is expected to be sentenced April 1 by 4th Judicial District Judge Thomas Kane.