LAPEER (WWJ) - Prison officials are thanking a member of the public for helping to prevent the escape of a prisoner during a bathroom break.

Two officers were transporting a 28-year-old prisoner Wednesday from Bellamy Creek Correctional Facility at Ionia to Macomb County for a court appearance when they stopped at a rest stop near Lapeer.

While one guard was using the bathroom, Michigan Department of Corrections spokesman Chris Gautz said, the prisoner announced that he had to go, too.

"We don't put prisoners in the actual restrooms with civilians at the rest stop. We hand them sort of a portable that they use in the back of the transportation van tha they are in," Gautz explained. "When the officers opened up the door to hand him that, he then started kicking the door and was able to jump out and jump onto the officer."

Gautz said the inmate had somehow maneuvered his belly chain, and tried to grab for the officer's gun.

"He had much more movement of his hands and his arms and his arms that he should have," Gautz said.

"Meanwhile, the other officer heard the commotion and came out. And when she got onto the scene, a bystander -- very brave and fortunate for us -- a bystander assisted the officer in holding the prisoner down."

The officers were able to secure the prisoner, Michigan State Police were called, and he was taken back to Ionia where he was placed under maximum security.

Gautz said transporting prisoners for court appearances always poses a risk, but there is a solution: "The more we can work with the courts to do more video conferencing, the better it is and the safer it is for everyone involved."

The prisoner is expected to face additional charges in connection with the attempted escape.