TAMPA, Fla. (WFLA) — A man is in police custody after an hours-long standoff at an apartment building near Westshore Boulevard in Tampa Thursday morning.

Police surrounded the Bowery Bayside by Cortland Apartments, which is in the 6300 block of Westshore Boulevard, after a man reportedly barricaded himself inside a residence.

Police spokeswoman Jamel Lanee’ said two women called 911 and said an acquaintance was in the home and threatened them with a gun around 6 a.m.

Police responded to the apartment complex and heard what they thought was the man racking a gun.

A SWAT team was called to the scene and rescued the women from a back bedroom window, using a ladder to bring them down to safety.

SWAT officers negotiated with the man for more than an hour. They used an explosive to try and enter the apartment, but were unsuccessful.

A News Channel 8 helicopter was over the scene and saw police surround the home with their guns drawn and firing a flash bang.

The man’s mother arrived at the scene and recorded a message that they played over a PA, but he wouldn’t come out.

Several rounds of gas were deployed into the apartment, then officers entered the unit and found the man in a bedroom.

He was arrested on charges of aggravated assault with a firearm and aggravated false imprisonment with a firearm with more charges pending, police said.