Boston Marathon bomber Dzhokhar Tsarnaev wanted to plead guilty and help the prosecution in exchange for life imprisonment, court documents unsealed Wednesday reveal.

But prosecutors did not make a deal, and Tsarnaev was convicted at trial and sentenced to death for the 2013 bombing, which killed three people and injured hundreds.

According to a document released Wednesday, Tsarnaev "offered to provide certain kinds of cooperation and assistance, in the course of plea negotiations."

An emergency responder and volunteers, including Carlos Arredondo, center in cowboy hat, push Jeff Bauman in a wheelchair after he was injured in one of two explosions near the finish line of the Boston Marathon on April 15, 2013 Charles Krupa / AP file

But the filing then says, "The government has consistently rejected Tsarnaev's conditional offers."

The filing was made in an effort to limit the ability of Tsarnaev's attorneys to raise the issue of the negotiations during the trial itself.

Prosecutors say in the documents that the bomber's attorneys wanted to introduce statements Tsarnaev made that he didn't want to kill "innocents."

Dzhokhar Tsarnaev. FBI

Ultimately, news of a possible plea wasn't made public until the day of Tsarnaev's sentencing in April 2015. His willingness to cooperate, however, was not revealed until Wednesday.

In another new detail, prosecutors say that one of the reasons FBI agents questioned Tsarnaev in his hospital bed is because "of the two remote-control detonators used during the Marathon bombings, only one was recovered, suggesting that the Tsarnaevs (or someone else) had retained the other one for possible use with additional bombs."

During interviews from the hospital where he was taken after his capture, Tsarnaev told FBI agents that he and his brother Tamerlan acted alone in building the explosives and planning the attack, according to newly released court documents.

Tamerlan had died after a shootout with police, and Dzhokhar was suffering from gunshot wounds to his face and jaw.

Unable to speak, Dzhokhar answered the FBI agents' questions in handwritten notes.