FRANKFORT, Ky. — A proposal to overhaul Kentucky’s troubled public pension system would inadvertently eliminate line-of-duty death benefits for some police officers and their families in roughly half of the state’s law-enforcement agencies, sending Republican Gov. Matt Bevin’s administration rushing to fix the 505-page bill before calling a special session of the state legislature to vote on it.

Most of the state’s police officers and firefighters are in a separate retirement system given the hazardous nature of their jobs. But local governments covering 47 percent of the state’s law-enforcement agencies have opted to put their police and sheriff’s departments into the nonhazardous retirement system because it is less expensive.

Bevin’s proposed bill to overhaul the state’s public pension systems would eliminate the line-of-duty death benefits for all new employees of the nonhazardous system, plus any employee hired after Jan. 1, 2014. That would include any police officers and firefighters in the nonhazardous system, according to David Eager, executive director of the Kentucky Retirement Systems.

“This was not the intent. The bill will be changed to clarify that police officers, firefighters and other first responders will continue to be eligible for line-of-duty death benefits going forward,” Bevin spokeswoman Amanda Stamper said.

The mistake highlights the treacherous task of tinkering with retirement benefits for more than 400,000 people across eight different retirement plans. When announcing the plan, Republican lawmakers emphasized they would spare police officers and firefighters from some of the changes out of respect for the dangerous nature of their jobs. But most of those protections are not available to the police officers who are not covered by the hazardous retirement system.

“Nonhazardous police officers in Kentucky are by far kind of a forgotten bunch,” said Nicolai Jilek, a lobbyist for the Kentucky Fraternal Order of Police who discovered the provision in the proposed pension bill. “When folks make the mistake of making that assumption that all cops are in a hazardous duty plan, those guys get left out.”

Jilek said his organization is still reviewing the bill and has not taken an official stance on it yet. He said he was grateful the governor’s office vowed to change it.

The massive bill was released Friday for the first time after months of secret negotiations among the governor and Republican legislative leaders. Bevin has not yet set a date for a special session of the state legislature to vote on the bill. Republican House Speaker Jeff Hoover has said he would like lawmakers to have at least 30 days to review the bill before voting on it.

“A bill of this magnitude and complexity has the potential to be full of intended and unintended consequences,” said House Democratic Leader Rocky Adkins, who opposes the bill. “I want to highlight this as yet another example of the potential negative impact on our dedicated public employees, teachers, and retirees.”

Republican state Rep. John Blanton, a retired Kentucky state police officer, said he had been involved with negotiations on the hazardous-duty system but said he was not aware of the change for nonhazardous employees.

“I will be very adamant that we … ensure that that is taken care of before anything goes through on it,” Blanton said. “That has been a challenge … making sure that anything that we are doing we are trying to make sure we are able to cover them as much as possible.”

Kentucky’s law ensuring death benefits for nonhazardous public workers killed in the line of duty is named after Fred Capps, a former western Kentucky prosecutor who was slain by a man awaiting trial. The state legislature passed it in 2001 and made it apply retroactively so Capps’ family would benefit.

Kentucky’s public pension systems are among the worst funded in the country. The state is at least $33 billion short of the money it needs to pay out retirement benefits over the next 30 years. The shortfall has strained the state’s annual $10 billion annual operating budget, threatening to crowd out spending needed for other government services.

Bevin’s proposed bill would close the state’s pension system for all new employees and most workers hired since Jan. 1, 2014. Those people would be moved into a 401(k)-style plan. Most other current employees would have their pension benefits frozen once they reach 27 years of service.