Police booked Herbert Floyd, 27, with two counts of attempted first-degree murder, court records show. The crime is punishable by up to 50 years in prison.

According to the New Orleans Police Department, the two undercover officers were in a van in the Fontainebleau area about 9:45 p.m. Friday looking for suspicious activity as part of an effort to combat an increase in armed robberies. They were at Fig and Burdette streets when a driver in a blue car pulled up behind them and flashed his headlights.

The officers started to drive away but the car's driver fired a bullet into the back glass of their van, said Garry Flot, a New Orleans Police Department spokesman. The driver followed the officers briefly before fleeing, Flot said.

Investigators soon identified Floyd as a suspect and obtained an arrest warrant. By about 1 a.m., detectives with the NOPD's 2nd District helped Jefferson Parish Sheriff's Office deputies track Floyd to the 700 block of Metairie Road, where he surrendered without incident.