A  Wisconsin man who formerly worked for the federal government is facing attempted murder charges for the shooting of an Amtrak conductor Tuesday afternoon because he could not get off the train at a station in west suburban Naperville, according to authorities.

Edward Klein, 79, of West Allis, Wisconsin, appeared in bond court Friday and Judge Joseph Bugos ordered him held on $1.5 million bond, according to the DuPage County state’s attorney’s office.

He is charged with attempted murder and aggravated battery with a firearm, according to the DuPage County sheriff’s office.

He was aboard an Amtrak train that left Kansas City for Chicago about 9 a.m. Tuesday, according to prosecutors. The train stopped at the downtown Naperville train station about 4:45 p.m. and some passengers got off.

A Wisconsin man has been charged with shooting an Amtrak conductor Tuesday afternoon at a station in west suburban Naperville that Amtrak shares with Metra. | Robert Herguth/Sun-Times

Klein stayed on the train, but decided he wanted to get off after the doors closed. When he was not allowed to exit, he “pulled a revolver, stuck his arm out of the window of the train door and fired one shot, striking the victim in the abdomen,” a statement from prosecutors said.

He then tried to get off the train by climbing through the same window, but “was unable to as train personnel and other passengers detained him until authorities arrived,” prosecutors said.

“I would like to recognize the brave acts of the passengers who restrained the suspect until police arrived, preventing him from possibly inflicting more harm,” Naperville Police Chief Robert Marshall said in the statement.

Klein was taken into custody and a handgun was recovered, police said.

The conductor, a 45-year-old Homewood man, was shot in the torso and was taken to Edward Hospital in Naperville, where he was conscious and alert, police said at the time. Prosecutors said he underwent surgery and remains in intensive care.

A GoFundMe page set up by co-workers to help pay his medical expenses had raised more than $8,000 of a $10,000 goal as of Friday morning.

“While the injuries sustained by the victim in this case are quite severe, it is my sincerest hope that he will make a full recovery and be back on the job soon,” State’s Attorney Robert Berlin said in the statement.

Klein will next appear in court June 12 before Judge Daniel Guerin, according to prosecutors.

A statement from Amtrak said: “Our Amtrak family and our customers thank the Naperville Police Department for professionalism and prompt action in bringing the case to prosecution. We are grateful for Naperville and DuPage County’s work and will continue in support, including with the Amtrak Police Department.”

State’s attorney’s office spokesman Paul Darrah said Klein formerly worked for the Federal Protective Services, a branch of Homeland Security that provides security for federal facilities.

Klein should not have had the gun in his possession, according to Amtrak’s policy on carrying weapons.

Guns are only allowed on trains if they are “unloaded and in a secure container as checked baggage between stations that accept checked baggage,” a spokesman said.

All guns must be declared in advance, and placed in checked baggage, according to Amtrak’s policy. Passengers failing to meet those requirements will be denied transportation, it reads.

Klein’s status as a former federal law enforcement agent would not have exempted him from that policy, the spokesman said.

Asked about screening at stations, the spokesman cited the Amtrak policies on safety and security.

“Numerous behind-the-scenes and front-line security measures are in place to ensure passenger security, including Amtrak Police Department uniformed police officers and Special Operations Units, random passenger and carry-on baggage screening and inspections, K-9 units, checked baggage screening and onboard ID checks,” the policy states.