Charles Michel, the Belgian prime minister, resigned on Tuesday night after his government collapsed in the face of virulent opposition to his signing of a UN migration pact from his erstwhile coalition partners.
Mr Michel lost the support of the Flemish nationalist N-VA, the largest party in his coalition, over the non-binding UN agreement, which opponents had claimed would open the door to greater migration.
Belgium is now bracing itself for a snap election as early as next month after Mr Michel said he was going to the king to offer his resignation amid demands for a motion of no confidence in his now minority government.
He had refused to submit to such a vote or the calls from some in the assembly for an early election. A snap poll, he said, would only lead to "stagnation for the whole of 2019". The next election is due in Belgium in May.
Instead, Mr Michel announced: "I am taking the decision to offer my resignation. I am now going to see the king."
Amid applause from parlamentarians, he picked up his briefcase, shook the hands of a number of government ministers, and left.
King Philippe of Belgium received Michel and is now expected to hold consultations between the political parties before calling elections in January.
The right-wing Flemish party quit the government after Mr Michel refused its demand to drop his support for the migration pact, and secured parliamentary approval to go ahead against its wishes.
It branded his weakened administration "the Marrakech coalition," after the city where the accord was signed just over a week ago.
Its withdrawal left his French-speaking liberal MR supported only by two smaller Flemish parties.
The UN migration pact was agreed in July by all 193 members except the United States, but only 164 formally signed it at the meeting on December 10.
Some European politicians say the accord, aimed at fostering global cooperation on the issue, could increase immigration to the bloc, which tightened restrictions on refugees and migrants in recent months. But supporters of the deal say claims it will encourage uncontrolled flows and embed migration as a human right are entirely false and aimed at fearmongering.
On Sunday, thousands of people turned out in Brussels to protest against the pact, at a rally called by Flemish right wing parties. Some 5,500 people, according to police figures, marched in the district housing the main European Union institutions, eclipsing a smaller demo of around 1,000 people in support of the deal.
Riot police stepped after projectiles and firecrackers were thrown, an AFP journalist on the scene reported. Some 90 people were detained, according to the Belga news agency.
The UN’s Global Compact for Safe, Orderly and Regular Migration is designed to frame an effective international approach to the issue, which has become deeply divisive in Europe since the peak of the migrant crisis in 2015.
Several EU countries pulled out of the pact before it was signed, including Austria, which holds the EU presidency, the Czech Republic, Italy, Hungary, Poland, Latvia, and Slovakia.
On Tuesday, Pope Francis warned against a growing tendency of politicians to exploit nationalism and fear of foreigners. He used a message to mark World Peace Day to insist: "Political addresses that tend to blame every evil on migrants and to deprive the poor of hope are unacceptable".