An inmate at a federal prison in central California has agreed to plead guilty to killing a correctional officer seven years ago to avoid a possible death sentence, federal prosecutors said.

Jose Cabrera Sablan, 47, agreed on Friday to plead guilty to murder in a negotiated agreement that will put him in prison for the rest of his life, U.S. Attorney Ben Wagner in Sacramento said in a statement.

Sablan is currently serving life with a chance of parole. The plea deal "would eliminate the possibility of release," Wagner said.

He also said that prosecutors had to consider the likelihood of obtaining the death penalty and fighting appeals in a case that has already gone through 7 years of litigation.

News of the agreement was first reported by KFSN-TV in Fresno.

The agreement was condemned by the union that represents 33,000 federal prison workers, including correctional officers. "It feels like there's no justice," said Eric Young, national president of the Council of Prison Locals.

The death penalty is a deterrent for inmates who might attack federal correctional officers, who don't carry guns in prisons, Young said.

He noted that it has been seven years since Officer Jose Rivera was killed on June 20, 2008.

"It's unfortunate that we're actually on the anniversary and ... his killers haven't gotten the ultimate punishment," Young said. "What message does that send to our inmate population? We want to know that there's an ultimate consequence when someone takes the life of our correctional staff."

Wagner's statement said his office and the Department of Justice are committed to prosecuting those who endanger the health and safety of correction officers.

Sablan was serving a life sentence for murder at the U.S. penitentiary in Atwater when he was accused of fatally stabbing Rivera, 22, a U.S. Navy veteran who served two tours of duty in Iraq and had been on the job for 10 months when he was attacked.

According to court documents, Rivera was returning inmates to their cells for a headcount when Sablan pulled an ice pick-like shank and a shaft the diameter of a large screw driver from his pocket and stabbed Rivera in the chest.

Another inmate, James Guerrero, held down Rivera while he was being stabbed. Guerrero took a plea deal last year and was sentenced to a second life term.

Rivera's mother said she was outraged and saddened by prosecutors' decision not to pursue the death penalty for her son's killer.

"My son gave his entire life to his country. He believed in the justice system and it failed him," Terry Rivera said from her Merced home.

"I know it would be hard to get the death penalty, but we could have fought for it harder," she added.

Sablan is expected to enter his plea July 17 in a Los Angeles courtroom.

___

Associated Press writers Robert Jablon and Daisy Nguyen contributed to this report.