Police made an arrest early Wedensday morning in the "ambush style attack" on two Miami-Dade detectives late Monday night outside a Northwest Miami-Dade apartment complex.

Miami-Dade Police tweeted the new details, while NBC 6 has confirmed that a 19-year-old suspect has been charged in the shooting.

Several people were detained Tuesday in connection to the shooting, which happened just before 10 p.m. near Northwest 62nd Street and 20th Avenue.

Miami-Dade police said the two officers were investigating gang activity in the area as part of a multi-agency task force. The detectives were in an unmarked police vehicle when, according to officials, several suspects "ambushed" the car and opened fire. The officers returned fire, Miami-Dade Police Maj. Hector Llevat said.

"They were ambushed in their vehicle, unprovoked," Llevat said.

Miami-Dade Police Department

The wounded officers were rushed to Jackson Memorial Hospital in the bed of a pickup truck and were being helped inside by their colleagues, NBC 6 video shows.

The officers, Charles Woods, 37, and Terence White, 47, were reported in stable condition and in good spirits, police said. Woods was treated for his injury and released, police said.

Hialeah Police said a person of interest in the shooting later showed up at Hialeah Hospital while another was detained at the Hyatt Place on Northwest 35th Street across from Miami International Airport.

Late Tuesday, Miami-Dade Police said one of the people detained and being questioned in the shooting was arrested for unrelated charges. He was identified as 18-year-old Alexander Stalling.

Woods is an 11-year veteran of the department and White has been on the force for 26 years.

[NATL] Top News Photos: Pope Visits Japan, and More

"Our prayers go out to the speedy recovery of our officers and their families that really had the scare of their life tonight," Perez said.

Miami Beach Police Chief Daniel Oates offered support to the injured officers on social media, tweeting: "@MiamiDadePD prayers for our partners and ready to offer any needed support from @MiamiBeachPD."

"We need you to step up to the plate. If you know something, if you saw something then say something. Today is the day to step up," Perez told reporters in pleading for help finding whoever is involved.