BUCHAREST, Romania — The Romanian Parliament approved changes to the criminal code in unusually swift fashion this week, overhauling abuse-of-power legislation that critics say will have damaging and long-lasting effects on the rule of law in the country.

“What is happening these days could be called the dictatorship of the majority and is profoundly damaging to democracy,” President Klaus Iohannis, a former leader of the opposition National Liberal Party, said at a news conference on Wednesday.

He was referring to the bill, proposed by the Justice Ministry, that passed through a parliamentary committee and both houses of Parliament in just three days: The lower house of Parliament voted 167 to 97 in favor of the changes on Wednesday, partly decriminalizing abuse of office just one day after the Senate passed it overwhelmingly.

To take effect, the changes would need to be signed into law by Mr. Iohannis, a requirement that paves the way for a major political fight. Opposition parties, as well as the president himself, have vowed to challenge the new legislation in the Constitutional Court, and thousands have taken to the streets of Bucharest and other Romanian cities in protest.