LINCOLN, Neb. (AP) — A Nebraska police officer and a Chicago man were both injured during a confrontation on a bus in front of about 20 people early Tuesday after the man refused to get off and pulled a knife, authorities said.

Officers were called to the Lincoln bus depot around 12:15 a.m. Tuesday because the 27-year-old Chicago man who didn’t have a ticket or money for the fare to Iowa, acting Lincoln Police Chief Michon Morrow said.

The man pulled a knife and lunged at one of the officers in the back of the bus, striking him in the neck, police said. Morrow said the man refused several commands to drop the knife before reaching for the officer’s gun. At that point, another officer fired and wounded him once.

Morrow said the situation could have easily been much worse, but fortunately no one else was hurt and the injured officer and suspect are both expected to live.

“I’m very proud of our officers and the quick actions that they took to minimize the impact of injury to again those on the bus and additionally the suspect,” Morrow said. “They showed incredible restraint based on the struggle that they had with an armed assailant at that point in time.”

Authorities did not immediately release the names of the suspect or the officers involved, so their families could be notified first. Both the injured officer and suspect were being treated at a hospital Tuesday morning. Prosecutors plan to charge the Chicago man with assaulting an officer and using a weapon to commit a felony after he’s released from the hospital.

Morrow said that investigators determined that the Chicago man had been reported missing Monday night with an RV that had been stolen Sunday. The Nebraska State Patrol found the stolen RV Monday near the small town of Goehner, Nebraska, which is about 30 miles (48 kilometers) west of Lincoln.

The officer who shot the suspect has been put on leave while the shooting is investigated.