A gunman opened fire on four Miami-Dade County police officers during a traffic stop Thursday, killing one and injuring the other three. Police killed the suspect hours later, authorities said.

Dozens of officers from police departments across South Florida had been searching for 12 hours for the suspect, who investigators identified as Shawn Sherwin Labeet, 25. Miami-Dade Mayor Carlos Alvarez said Labeet was found shortly before midnight Thursday in a Pembroke Pines apartment complex about 30 miles north of the initial shooting scene.

• Click here for photos.

Click here for the story on WSVN.com.

"There was an exchange of gunfire and the subject was shot and killed," Alvarez said.

He said the family of the dead officer was informed of Labeet's death.

"They asked us for one thing," Alvarez said. "They asked us to catch the subject. Well, I'm happy to report that shortly before midnight, we found the subject."

Alvarez identified the dead officer as Jose Somohano, 37, a married father of two. Another officer, Jody Wright, 31, underwent several hours of surgery to repair her severely injured leg. The other two officers were treated and released.

The officers were conducting burglary surveillance in the Cutler Bay area of southern Miami-Dade County when they stopped the man because he was driving a car erratically, police spokeswoman Linda O'Brien said. The man opened fire with a high-powered weapon without warning and fled. It was not immediately clear whether the officers returned fire.

Labeet, who may have been wearing a bulletproof vest, fled in his car, which was found abandoned 5 miles away, officials said. An AK-47 assault rifle was found inside, Alvarez said. It wasn't immediately known if it was the weapon used in the shooting.

Labeet's girlfriend had earlier given officers the name of another man, Alvarez said. Investigators wasted several hours looking for him before he came forward hundreds of miles away in Jacksonville, hearing that he was wanted. He was not involved in the shooting.

"I'm sure she'll be facing some charges," Alvarez said of Labeet's girlfriend.

Several schools were locked down during the search in Miami-Dade and Broward counties, in suburban Miami.

Two other officers were shot separately last month in neighboring Broward County. One was killed, the other badly injured.