Romanian prime minister Victor Ponta has announced the resignation of his government after huge protests in the wake of a nightclub fire that killed more than 30 people.

"I'm handing in my mandate, I'm resigning, and implicitly my government too," Mr Ponta said in a statement. He said the government would stay on until a new one is in place.

"I am obliged to take note of the legitimate grievances which exist in society," said Mr Ponta. "I hope handing in my and my government's mandate will satisfy the demands of protesters."

Thousands took to the streets on Tuesday night in a spontaneous protest. They shouted "Shame on you!" and "Assassins!" and waved Romanian flags.

Anger has been brewing for some time in Romania against the government, which many perceive as being corrupt, and Friday's fire has added to the discontent.

Witnesses said the fire at the Colectiv in Bucharest broke out during a heavy-metal concert in the basement club when a spark ignited foam decor, sending panicked people stampeding for the single exit.

The death toll stands at 32, with some 130 still in hospital, dozens of them in serious or critical condition.

President Klaus Iohannis will name a prime minister to form a new government, which needs to be approved by parliament.

If this fails twice, early elections will be called. Romania is scheduled to hold parliamentary elections in December 2016.

Mr Ponta later proposed defence minister Mircea Dusa as an interim prime minister, an appointment that Mr Iohannis needs to approve.

Mr Ponta told reporters: "We have turbulence, uncertainty, and unrest... we risk ruining everything we built."

The mayor of the district where the nightclub is located, Cristian Popescu Piedone, also resigned on Wednesday, saying he is morally guilty for the deadliest fire in Romania's history.

Mr Piedone said: "I assume the moral blame. As for the legal (blame) I will leave it to justice to pronounce."

Mr Iohannis called for a sea of change in Romanian politics and praised a protest of more than 20,000 people on Tuesday against the government following the deaths.

The president had repeatedly called on Mr Ponta to resign since a corruption probe against him began in June.

Alluding to widespread corruption and indolence, he said that if rules and norms about fire regulations had been respected "nobody would have died".

He said the tragedy "affected the nerve of the nation".

The president said he was ready to take on the responsibility of changing the way things are done.

Deputy leader of the opposition Liberal Party, Catalin Predoiu, hailed the resignations. "This is a victory of the street. It is a lesson for all politicians," he said.

Party co-leader Alina Gorghiu called for early elections and said the party wanted a broad political agreement on a solution for the political crisis.

The ruling Social Democratic Party does not want early elections, its leader Liviu Dragnea said.

Even before the fire, Mr Ponta was on trial for corruption charges including tax evasion, money laundering, conflict of interest and making false statements while he was working as a lawyer in 2007 and 2008.

At the time, Mr Ponta was a lawmaker. He denies wrongdoing and until now had rejected calls for him to resign.

Romanians had also called for the resignation of interior minister Gabriel Oprea over the death of a police motorcyclist escorting his motorcade, who died after he hit a hole on October 20.

Mr Oprea said he met Mr Ponta the night before as the protests raged in the capital and the pair decided to step down during a two-hour meeting. He said he would not take part in a future government.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.