TORONTO -- Police say three people are dead, and 15 others are being treated in hospital for various injuries following a fire at a seniors' building in Toronto.

Paramedic spokesman Peter Rotolo says four people were taken to hospital in critical condition after the Friday afternoon blaze -- three have been pronounced dead.

Rotolo says the residents were taken to hospital after paramedics and firefighters pulled them from apartments on the top floor of the five-storey building.

A fire spokesman says some of the seniors were brought down ladders because the hallways were too full of smoke.

Division commander Bob O'Halloran says the origin of the fire remains under investigation, but notes that much of the damage appeared to have occurred in the fifth-floor hallway.

O'Halloran says most residents were evacuated from the fifth floor but the people in two apartments were "sheltering in place" and were known to be "OK."

"There are two people on the fifth floor, two apartments that it was better to shelter them in place than bring them out through the smoke," he said. "They're being checked on from time to time -- they're OK."

O'Halloran said there were challenges in getting people out of the apartments.

"You knock on doors and sometimes people don't hear you, don't answer their door ... if we don't have keys we have to force the doors to make sure people are out of there," he said.

"We forced quite a few doors."

Residents have been allowed to return to apartments on the first four floors.

Jeff Tebby, a spokesman for Ontario's Fire Marshal, said most of the damage was in a fifth floor hallway area. He said the building met fire code requirements on sprinklers but investigators were going to investigate whether smoke detectors were adequate. There was no immediate indication that the residents couldn't move out of danger quickly enough due to their age.

"Age is not necessarily a contributing factor that we're aware of," Tebby told reporters Friday night. "If that becomes a factor we will address it down the road."

Toronto Mayor John Tory visited the scene until early Saturday and praised the actions of emergency responders.

Tory said in a statement that the real danger in a fire is more from smoke that the fire itself.

"I hope we can learn any possible lessons as to how people, especially those more vulnerable, can be better protected in circumstances such as this," he said.