Romania's justice minister has resigned after huge nationwide protests over government efforts to weaken anti-corruption laws through a decree.

Florin Iordache's resignation on Thursday came as rallies calling for the government to resign continued despite the Social Democratic-led leadership's pledge to scrap the decree, which would have decriminalised some corruption offences.

"I have decided to offer my resignation," said Iordache, 56, a co-architect of the January emergency rule which critics say would have protected corrupt politicians from prosecution.

READ MORE: Romania protests - Voices from the street

He defended his record at the justice ministry, saying he carried out "all necessary actions to remedy a series of sensitive problems.

"But despite that, public opinion did not consider it sufficient, and that's why I have decided to submit my resignation."

Iordache said all of his "initiatives were legal and constitutional".

Against this turbulent backdrop, Sorin Grindeanu, Romania's prime minister, survived a no-confidence vote on Wednesday despite the ongoing protests.

Bowing to pressure, the government scrapped the ordinance on Sunday as up to 500,000 people protested across the country.

The rallies were the largest protests in the country since the fall of communist rule in 1989.

In a related development on Thursday, Romania's constitutional court said it would not rule on the decree.

The decree was referred to the court by Victor Ciorbea, the national ombudsman, on February 3, two days before the Social Democrats withdrew it.

OPINION: Romania's gift of hope to the world

"This decree does not exist any more. It was scrapped [by the government]," said Valer Dorneanu, the court president.

"We start from the truth that the emergency decree no longer exists."

The withdrawal must still be approved by parliament.

Asked what would happen if parliament does not do so, Dorneanu said: "We don't judge based on suppositions."