A fast-moving fire tore through a three-story building housing homeless people in northwestern Poland early Monday, killing at least 21 people and injuring 20 more, including an infant, officials said.

The blaze broke out around 1 a.m. in a shelter for people waiting for social housing in Kamien Pomorski, some 370 miles from the Polish capital and near the Baltic Sea coast, said Pawel Fratczak, a spokesman for Poland's national firefighters.

"While searching the building again this morning, we found the bodies of three more people, raising the toll to 21 dead," Fratczak said.

"It is going to be hard to identify many of them quickly because they are so badly burned."

Footage broadcast on TVN24 television showed the charred, gutted shell of the building surrounded by fire engines.

There were 77 people registered as residents in the building at the time of the blaze. Fratczak said not all were yet accounted for, and that the death toll could still rise.

The injured, many of whom suffered broken bones after jumping out of windows on the upper floors to escape the blaze, were taken to local hospitals. Two people were being treated for burns, including an 8-month-old baby.

The injuries are not considered life-threatening, Fratczak said.

Prime Minister Donald Tusk flew to Kamien Pomorski early Monday to inspect the damage, and promised aid for those who survived the blaze. President Lech Kaczynski declared three days of national morning to start at midnight, and was also on his way to Kamien Pomorski.

It was not immediately clear what caused the blaze, but police and fire investigators were on the scene.