(Reuters) - A second suspect was arrested on Wednesday in connection with a Los Angeles shooting over the weekend where two men opened fire on a police squad car.

James Brooks, 19, was taken into custody in Las Vegas by a joint FBI and Los Angeles Police Department task force, FBI spokeswoman Laura Eimiller said.

Prosecutors said two officers on Sunday were driving their patrol car through a south Los Angeles intersection where rival gang members had been engaged in a firefight when their vehicle was fired upon.

One of the officers returned fire, but no one was injured in the exchange.

Law enforcement officers around the country were on edge in the aftermath of a New York City ambush earlier this month in which two policemen were shot to death as they sat in their patrol car in Brooklyn.

Brooks' arrest comes a day after accused gang member Christopher Taylor, 18, was charged with assault on a peace officer, assault with a semi-automatic firearm and shooting into an occupied vehicle in connection with the incident, the Los Angeles County District Attorney's Office said.

Taylor faces a maximum sentence of life in prison if convicted.

The FBI spokeswoman referred further questions regarding the charges to Los Angeles police. But a LAPD spokeswoman could not provide additional information.

The weekend shooting led the LAPD to issue a citywide tactical alert, allowing commanders to keep officers on duty beyond their shifts.

A perimeter was also established around several city blocks as police swarmed the area to search for the perpetrators.

(Reporting by Curtis Skinner in SAN FRANCISCO; Editing by Ryan Woo)