Florida deputies have arrested a second 19-year-old man who shot at undercover deputies outside a mall on Monday when a gun buy operation went awry and turned into armed robbery, authorities said.

Jaycob Riley was located and arrested Wednesday night, the Hillsborough County Sheriff’s Office said in a news release.

FLORIDA UNDERCOVER DEPUTIES INVOLVED IN SHOOTING AT MALL AFTER GUN DEAL OPERATION TURNS INTO ARMED ROBBERY

Riley was the second suspect allegedly involved in the shooting outside the Westfield Brandon Mall. The other suspect, 19-year-old Jordan Gracia, was arrested shortly after the incident.

Two suspects opened fire at undercover deputies outside a mall in Florida on Monday after a gun buy operation turned into an armed robbery, authorities said.

Jaycob Riley, left, faces a slew of charges, including five counts of attempted first-degree murder. Jordan Gracia, right, faces a charge of armed robbery, felon in possession of a firearm, and dealing in stolen property.  (Hillsborough County Sheriff's Office)

Riley and Gracia were meeting with an undercover detective, who was trying to buy firearms from the suspects, the sheriff’s office said. 

The sheriff’s office released video of the transaction taking place inside the undercover detective’s vehicle, saying it shows the suspects attempting to rob him at gunpoint. 

Two suspects met with an undercover detective with the Hillsborough County Sheriff's Office to sell him firearms outside the Westfield Brandon Mall on Monday. The transaction turned into armed robbery when the suspects held the detective at gunpoint.  (Hillsborough County Sheriff's Office)

When undercover deputies waiting nearby moved in toward the vehicle to help the detective, the suspects fled and fired multiple shots at the deputies, according to the sheriff’s office. Deputies didn't return fire, and no deputies or civilians were injured.

Riley remained on the loose until deputies found him Wednesday night.

Two suspects opened fire at undercover deputies outside a mall in Florida on Monday after a gun buy operation turned into an armed robbery, authorities said.

The incident unfolded outside the Westfield Brandon Mall around 4 p.m. on Monday. (Hillsborough County Sheriff's Office)

Riley was previously convicted of grand theft and other charges and sentenced to up to a year in prison in March, the Tampa Bay Times reported.

Gracia has a lengthy criminal record, according to authorities, including past charges of armed burglary, juvenile in possession of a firearm, resisting arrest, and carrying a concealed firearm.

CLICK HERE TO GET THE FOX NEWS APP

In connection to the most recent incident, Riley faces five counts of attempted first-degree murder of a law enforcement officer, robbery with a firearm, felon in possession of a firearm and shooting at, within, or into an occupied vehicle.

Gracia faces a charge of armed robbery, felon in possession of a firearm, and dealing in stolen property.