A gunman who barricaded himself with hostages inside a South Florida apartment complex killed six people before being shot to death by a SWAT team, police have said.

Sergeant Eddie Rodriguez says the stand-off began at about 6.30pm yesterday in a five-storey building in Hialeah, north of Miami.

He said police discovered two people shot to death in the hallway in front of one apartment, and three more in a unit on another floor.

Another man was killed across the street when the gunman allegedly spotted him and took aim.

Sgt Rodriguez says the two hostages the man took were unharmed. Before the shootout, police communicated briefly with the gunman.

Neighbors say the gunman lived in the building but police would not confirm that or give details on his identity or possible motive.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.