PARRISH, Ala. (AP)  A nearly 40-mile police chase through central Alabama ended early Monday with an officer shooting and wounding a driver after authorities used spikes to stop the vehicle.

Authorities said the pursuit began in the Birmingham suburb of Homewood before dawn after police attempted to stop a white BMW. The chase ended in the Walker County town of Parrish, one county away.

Authorities said the driver who was shot was flown by helicopter to UAB Hospital in Birmingham; his condition was not immediately available.

Another person, described only as a juvenile, was arrested.

“It”s unfortunate anytime someone is shot, whether it be a suspect or law enforcement. But we”re just thankful it wasn”t any worse than it was,” said Jonathan Appling, a state trooper spokesman.

The pursuit began about 2 a.m. when Homewood police officers were attempting to question a man at a hotel. Police spokesman Lt. Eric Hampton said the person was being interrogated during an investigation, but he would not elaborate.

Several police agencies gave chased once the BMW fled, and authorities eventually used spike strips laid down in an intersection to blow out the vehicle”s tires.

Hampton said the suspect emerged from the car with a handgun after the car was disabled, prompting a Homewood officer to open fire.

The State Bureau of Investigation and prosecutors in Walker County will investigate the shooting.