Latvian prime minister Valdis Dombrovskis has resigned over the collapse of a supermarket roof in the capital of Riga which left 54 people dead and 40 injuured.

"I announce resigning from the post of prime minister, taking political responsibility for the tragedy," Dombrovskis said.

His spokesman Martins Panke told AFP: "The government takes responsibility."

The government had come under intense criticism with Dombrovkis declaring that the tragedy had shattered the country and President Andris Berzins calling it "murder".

Latvian police launched an investigation into the collapse, one of the worst of its kind in Europe for decades.

Reports indicated that the roof fell in either because it was built badly in the first place or because workers were constructing a garden area on it with inadequate support.

The incident resulted in the biggest loss of life in Latvia since it achieved independence from the USSR in 1991.