The cops were sitting in their unmarked car near housing projects known as “The Rockies” on Monday night when the assailants approached the vehicle and opened fire on them, local media reported.
According to John Rivera, president of the Miami-Dade police union, one of the officers was able to return fire. They both survived the shooting with minimal injuries. One officer was shot in the leg while the other was only grazed by a bullet.
Miami-Dade Police Director Juan Perez confirmed to the press that the unnamed cops were in stable condition.
A witness told CBSMiami that she heard “at least two dozen” shots at the time of the incident.
Police had cordoned off a large area. The motive of the shooting was still unclear.
Anti-police sentiment has been high across the US over the past years, due to a surge of unjustified killings of unarmed African Americans and other minorities, mainly by white law enforcement officers.
Last year was one of the deadliest for the US police. According to the website Officer Down Memorial Page (ODMP), a total of 63 officers were killed by gunfire and 12 more died as a result of vehicular assault throughout 2016.
One of the deadliest ambush attacks over the past years occurred last July, when five officers were shot dead and 9 others were injured in Dallas, Texas. Ten days later, three more officers were shot in Baton Rouge, Louisiana.
The attacks took place after police killed two black men in separate incidents.
As of Tuesday, at least 10 police officers had been shot dead in the line of duty since the beginning of 2017, ODMP reported.