PALM BEACH GARDENS (CBSMiami/AP) — An MS-13 gang member was killed after he shot a deputy in the face during a confrontation, according to the Palm Beach Sheriff’s Office.

At a media briefing late Thursday, Sheriff Ric Bradshaw said the deputy underwent surgery and is expected to be okay.

READ MORE: Police Confirm 'Remains Of Female Found' In Search For Missing Andreae Lloyd

Thursday was the deputy’s 29th birthday.

The shooting happened near PGA Boulevard and Military Trail around 8 p.m. after a drug deal went south.

The deputy was an undercover narcotics agent working with the DEA and the FBI.

READ MORE: Miami Beach City Commissioners Considering New Measures To Address Crime In Entertainment District

Bradshaw said the deputy and other agents met the suspect in a parking lot close to Turnberry Apartments where the suspect lives in order to conduct a drug deal, according to WPEC.

However, the agents identified themselves when they pulled up to the vehicle, Bradshaw said.

When the undercover deputy walked up to the driver’s side of the car, the suspect shot him two to three times, causing a bullet to be lodged in the deputy’s cheek. The suspect was then shot and killed in his car.

MORE NEWS: Routine Child Vaccinations Drop By About 50% in Broward

The Florida Department of Law Enforce is investigating the shooting.