Emil Boc, Romania's prime minister, has resigned after weeks of nationwide protests against a slew of austerity measures and months before a parliamentary election.

"It is the moment for important political decisions. From this point of view, I took the decision to give up the government's mandate," Boc said in a speech after a government meeting on Monday.

Boc enforced the cuts, including slashing public salaries by a quarter and raising sales tax, to complete a $26.24bn International Monetary Fund (IMF) bailout deal and boost the economy after a deep and bitter recession.

Thousands of Romanians have braved freezing temperatures in the last month to protest against Boc and his ally, President Traian Basescu.

The popularity of Boc's centrist PDL party has sunk to less than 20 per cent, according to opinion polls, with a parliamentary election due later this year.

Victor Ponta, leader of the leftist USL opposition alliance, told the Reuters news agency last week he wanted an early election and was committed to working with the IMF.

The opposition alliance has more than 50 per cent support in opinion polls.