A hostage situation developed, and three hours later SWAT team officers used armored cars to storm the club before shooting dead the gunman. It was unclear when the victims were killed.
Dozens of terrified patrons, some of whom had been hiding in restrooms, were rescued. One officer was injured when he was hit in his helmet while exchanging fire with the gunman, police said.
A man was arrested in California with assault weapons and possible explosives on Sunday and told authorities he was in the Los Angeles area for the gay pride festival, the Los Angeles Times reported.
Representative Adam Schiff, the top Democrat on a congressional intelligence committee, noted that the Orlando shooting took place during Ramadan, and that Islamic State leaders who control territory in Syria and Iraq have urged attacks during this time.
According to local law enforcement, the shooter had declared his allegiance to Islamic State, Schiff said in a statement, all of which "indicates an ISIS-inspired act of terrorism."