Students tried stripping to their underwear and handing out free chips; giant lions and roosters snogged in the street; the country's leading actor ordered all men to go on shaving strike; and a woman senator said politicians' wives should deny them sex.

But in the end, it took a looming financial meltdown in the eurozone to force Belgium's absurdly divided and squabbling political class to form a government.

After breaking the modern-day world record for failing to form a government – making war-torn Iraq look like amateurs – Belgium has surmounted the linguistic and cultural stand-off that threatened to wipe it from the map, and agreed to form a coalition in the name of sorting out its finances.

After 535 days without a proper leader – the country has been led by a transitional caretaker government – Belgian officials said there was now likely to be a coalition cabinet in place next week.

But the crisis has left divisions more deeply entrenched than ever between the rich, Dutch-speaking north and poorer, French-speaking south, with melting pot Brussels marooned in the middle.

More than 80 rounds of negotiations came to nothing but in the end Belgian politicians had no choice after Standard & Poor's downgraded its credit rating and borrowing stood as high as the country's GDP, with its banking sector seriously shaken.

Yet the birthplace of René Magritte, and spiritual home of surrealism, might not yet have finished with the absurd political crisis. The 180-year-old country once described as an accident of history might have averted a split, but the linguistic iron curtain remains in place.

During the year-and-a-half-long crisis, relentless stereotyping was in abundance, deepening the divide, with Flemings, who make up 60% of the 10.5 million population, described as a bunch of tetchy, right-wing nationalist extremists, and Francophones as work-shy scroungers.

A tentative coalition of six parties of very different political hues now faces the minefield of putting in place severe austerity measures, tax changes and cuts, which are bound to spark social unrest, with strikes already planned on the streets of Brussels.

No easier task is the plan to reform the very essence of the way politics in divided Belgium are run.

Conspicuously absent from the coalition is Belgium's biggest single political party, the right-wing, separatist Flemish N-VA, led by Bart De Wever, whose electoral triumph last year helped cement the deadlock. His major political platform was to dissolve Belgium and split Flanders from French-speaking Wallonia. This hasn't happened and De Wever is now shouting from the sidelines.

Meanwhile, the ruling coalition will be led by the colourful, bow-tie wearing and perpetually smiling figure, Elio Di Rupo. At 60, he will be Belgium's first French-speaking prime minister in 30 years, a rare centre-left voice in a European Union that has veered right, and one of few proudly gay world leaders. He's also the first Socialist to take the premiership in Belgium since 1974.

But he speaks poor Dutch. This is a serious problem in a country where language is so important and so fiercely protected that, in areas of Dutch-speaking Flanders, town council meetings can find their decisions annulled if anyone is heard to utter a word of French.

The biggest Flanders daily, Het Laatste Nieuws, has slammed Di Rupo's dire pronunciation and syntax. He has promised to improve. But the failing is not lost on the Flemish separatist De Wever, who said: "My Nigerian-origin cleaning lady who has been in Belgium for two years speaks better Dutch than Elio. In Brussels you can't sell a handbag without being bilingual, yet you can become prime minister without speaking proper Dutch."

Political observers said they believed the coalition federal government could hold, but that Belgium now faced major cuts and reforms ranging from pensions to taxes and unemployment benefits, which could upset unions and business leaders alike. The absurd political stalemate has also left its scars.

Pascal Delwit, professor in political science at the Free University of Brussels, said: "Belgium is the capital of surrealism, and this long political crisis was typically surrealist, accompanied by a kind of general calm among citizens. When there was a hung parliament in 2010 in the UK, after six days people were saying 'what's happening?'. Here it lasted more than 530 days, with no mass movement in the streets, a calm pragmatic population that accepted the surrealist elements."

But he said the divide between the two main linguistic communities – around 75,000 Belgians speak German – had deepened during the stalemate: "The crisis and insults have made it worse. The idea of Belgium breaking up and separating was repeated so much it became a more accepted idea. And we saw repeatedly how French-speakers see Dutch-speakers as arrogant proto-fascists and Francophones are seen as lazy people who refuse to work. Yet what we've now shown is that Dutch-speakers and French-speakers from left and right could agree on a difficult budget. It's as if Conservatives, Lib Dems and Labour formed a government together."

Pierre Vercauteren, politics professor at the University of Mons, called the new political consensus a "historic moment". "The conclusion of the political accord its a huge relief for Belgian people. But just because there is relief, that doesn't mean everyone is happy with the accord."