Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A Florida man was shot dead by authorities Saturday night after barricading himself in an apartment with his ex and her son.

The man held his former partner and a 9-year-old boy hostage at an apartment building in Hialeah, a city in the Miami metropolitan area, after shooting and wounding two of her relatives, according to NBC Miami. Police said the man began shooting at authorities after a SWAT team arrived at the apartment around 9:30 p.m.

Officers were in a standoff with the man for several hours before they were able to enter the residence and rescue the boy, who was unharmed. The man’s former partner was found injured with a gunshot.

The man was shot dead by authorities after he barricaded in the bathroom, according to NBC Miami.

The man’s former partner and the two relatives who were shot escaped to an apartment are recovering.

The Hialeah Police Department did not immediately respond to a request for more information from NBC News.