BUCHAREST, Romania — Romania’s center-left government was toppled on Thursday after a no-confidence motion brought by opposition parties, the fourth time the country’s leadership has been ousted in such a vote since the 1989 revolution.

Many had felt that the governing Social Democrats’ time in charge would soon run out. Since coming to power in December 2016, the party has faced large-scale protests over graft and what many considered attacks on the rule of law.

Half a million people took to the streets in February 2017 after the government passed an emergency decree that effectively decriminalized low-level corruption. Further protests erupted over longstanding corruption in the country and what many saw as efforts to undermine the judiciary, including the firing of Laura Codruta Kovesi, the head of Romania’s anticorruption agency, in July 2018.

Shortly after suffering a stinging defeat in European parliamentary elections this May, the party’s leader, Liviu Dragnea, was jailed for abuse of office.