ST. PETERSBURG, Fla. (AP) — A police officer fatally shot an armed carjacking suspect when gunfire erupted during an attempted traffic stop in Florida early Wednesday morning.

It was shortly after midnight Tuesday when officers spotted a white pickup truck that had been involved in a carjacking hours earlier, St. Petersburg police Chief Anthony Holloway said during a Wednesday morning news conference. He said the officers had their lights off as they followed the truck.

Suspect Timothy Earl Jackson, 33, pulled into an alley and the two police cruisers pulled in behind him, Holloway said.

Jackson got out of the vehicle and fired at the officers, who fired back and hit him. He was taken to a hospital, where he died.

Holloway said Jackson fired at the officers using a black semiautomatic weapon. The victim told investigators a similar weapon was used during the carjacking.

It's not yet known how many rounds were fired, Holloway said. He said two officers involved in the shooting weren't injured. He didn't identify those officers. An investigation is continuing and police are searching for a second suspect in the carjacking.

Jackson was released from prison in August after serving a nine-year sentence for robbery, Holloway said.