PHOENIX — A man is dead after he attacked a city bus driver and a passenger with two large knives, then tried to carjack at least three drivers, according to the Phoenix Police Department.

Driving behind the bus was an off-duty sergeant with the Phoenix Police Department in his personal vehicle, according to police.

The off-duty officer ended the threat by shooting the suspect, who didn't listen to his commands, Sgt. Vince Lewis said.

The scene closed down Cactus Road near Interstate 17 for hours as police investigated.

"Just drive," said Lewis, relaying what the suspect told the bus driver as he boarded near 49th Avenue just before 5 p.m. Saturday.

There were two other passengers on board.

By the time the bus came to a stop between 28th Drive and the I-17 overpass, police said the suspect had cut the driver, stabbed a passenger and jumped off to look for a getaway car.

"He was then seen attempting to steal as many as two or three vehicles," Lewis said.

That's when the off-duty officer got involved.

"Armed with these two large knives, the suspect refused commands," said Lewis. "That's when the officer fired, striking the suspect and ending the threat."

It wasn't clear how many times the suspect was shot, but he died at the scene from his injuries.

Medics took one of the victims to the hospital.

Both victims were expected to be OK.

"[The officer was] right place at the right time," said Lewis. "So much more could have happened had this threat not been stopped when it was."

The officer will be on paid administrative for a period of time for an internal investigation to take place.

The county attorney will also be involved to decide if the officer’s actions were lawful.

As of Saturday night, the officer was in good standing with the department.

Detectives will work to determine if drugs or alcohol were factors.

On Sunday, police identified the suspect as 27-year-old Humberto Edwards.