BOISE, Idaho — An Idaho man has agreed to plead guilty to a federal hate crime in the death of a gay man in exchange for a chance at a 28-year sentence instead of life in prison.

Kelly Schneider, 23, acknowledges in court documents he lured victim Steven Nelson to a remote area and used steel-toed boots to kick Nelson roughly two-dozen times while Nelson begged for his life.

The plea agreement document filed in Boise's U.S. District Court on Wednesday outlines the details of the crime.

Kelly Schneider, 23, is seen here in an undated mugshot. Police Handout

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

On April 27, 2016, according to the document, Schneider posted a solicitation for sex on Backpage.com, along with a shirtless photo of himself. Nelson responded to the posting, and the two met that same night. Though Schneider took Nelson's money, the two didn't engage in any sexual acts, according to the plea agreement.

"Before the encounter, the defendant told his friends that he was not gay and would not let anyone who was gay touch him," U.S. Attorney Wendy Olson wrote in the plea agreement.

Schneider contacted Nelson and agreed to meet him at a local Wal-Mart parking lot. There, he asked Nelson to drive to an isolated wildlife area outside of town for a romantic encounter.

Unbeknownst to Nelson, however, Schneider planned a robbery and had two of friends lying in wait at the wildlife area in case Nelson resisted.

Schneider began beating Nelson as soon as they arrived, and Nelson never resisted, according to the plea agreement.

Instead, he volunteered his ATM number and begged for his life, saying, "Please don't kill me. Take whatever you want," Olson wrote.

As Schneider's friends remained hidden, Schneider kicked and beat Nelson while taunting him with a gay slur. Then he stripped Nelson and left him at the wildlife area, driving away in Nelson's car.

Despite being critically injured, Nelson managed to make it to a house about a half-mile away to get help. He was able to describe the attack to police before he died in a hospital a few hours later.

Prosecutors have agreed to ask a judge to sentence Schneider to 28 years in prison, to be served at the same time as any sentence Schneider gets in Idaho state court, where he has already pleaded guilty to Nelson's murder.

Nelson faces up to life in prison on the state murder charge. Three other men — Jayson Woods, 28; Kevin R. Tracy, 21; and Daniel Henkel, 23 — have also been charged with murder in state court in connection with Nelson's death. They're awaiting trial.