“Victims are an elderly female patient, & female hospital employee. unk motive,” the Titusville Police Department said on Twitter.
The shooting took place on the third floor of the Parrish Medical Center in Titusville — 40 miles (64 kilometers) east of Orlando — local police said earlier via Twitter, adding that the victims had died.
Police arrested the gunman at the hospital, local television station WFTV reported. The authorities have not yet identified him.
Unarmed security guards had subdued and detained the suspect before the police arrived.
The suspect apparently did not know the victims or have any connection with the hospital, Brevard County Sheriff Wayne Ivey told local reporters.
“It appears to be extremely random,” he said, local channel WKMG reported. However, he cautioned that it was still early in the investigation.
Last month, a gunman killed 49 people inside a gay nightclub in Orlando, the worst gun massacre in recent US history.