BUCHAREST (Reuters) - Romania's parliament on Monday unanimously endorsed a presidential plan to hold a national referendum over anti-corruption reforms after mass street protests forced the government into an embarrassing U-turn over a graft decree.

President Klaus Iohannis, a former leader of the centre-right opposition, blasted the government over the decree that would have effectively shielded dozens of public officials from prosecution and torpedo a drive to stamp out high-level graft.

The architect of the decree, Justice Minister Florin Iordache, resigned last week, citing a need to appease public opinion in the European Union member state of 20 million, and arguing he had done nothing wrong.

The month-old Social Democrat government rescinded the decree one week ago after the biggest protests in the country since the fall of communism in 1989.

Iohannis now needs to come up with a timeframe to hold the referendum. While the wording on the ballot paper is up to the president, he said last month he wanted to hold the vote to see "the sovereign desire of Romanians," over the anti-graft drive.

Romanian President Klaus Iohannis walks outside the Presidential Palace to speak to government supporters protesting in front of it, in Bucharest, Romania February 8, 2017. Inquam Photos/Octav Ganea via REUTERS

According to law, a 30-day campaign must take place before the vote.

Parliament, where the ruling coalition holds a big majority, must still vote on whether to confirm the decree's withdrawal.

On Friday, Liviu Dragnea, the Social Democrat leader and lower house speaker, said parliament should meet to approve the withdrawal as soon as possible.

Parliament's vote on the presidential referendum plan was a necessary procedural step, but its opinion is not binding.

Anti-government demonstrators took to the streets for a 13th consecutive day on Sunday, though numbers have fallen sharply since a week ago when about a half of a million people took part in capital Bucharest and dozens of other cities.