The left and right deadlocked after the Swedish elections, and neither is able to command a majority. What might happen is uncertain, but what should happen is crystal clear.

First, no government should be formed on the basis of from the Sweden Democrats. Second, no matter how unpalatable it might be for the parties, some form of a left-right grand coalition is the only sensible option. Third, this grand coalition must prioritise confronting long-term structural challenges. These include housing, education, health and integration, as well as rising inequality.

Sweden is not the first, but the last of the Nordics to have seen a rise in support for the far right. Denmark was the first to succumb when the anti-immigrant Danish People’s party lent its support to a minority centre-right government in 2001. This same configuration runs Denmark today except that support for the Danish People’s Party has risen to 21.1% from 12%, even as the support for the governing Venstre of Prime Minister Lars Løkke Rasmussen has fallen to 19.5% from 31.2%, leading to the absurd outcome that the government has only 53 seats in the 179 seat parliament.

The Danish People’s party has single-handedly turned Denmark into a hotbed of anti-immigrant laws and sentiment. Driving the agenda, while not being held accountable as the party is not in government is not democratic and has allowed them to almost double support. This is not a model for Sweden to follow.

In Norway, the far-right Progress Party is the second largest party in government and holds, amongst others, the powerful finance, justice, immigration, oil and energy portfolios. Under its watch Norway has also drifted rightward clamping down on immigration and ratcheting up the anti-immigrant rhetoric. Sylvi Listhaug, who earned the sobriquet Norway’s Trump for her dog-whistle slogans was forced to resign in March but has been quietly rehabilitated as the party’s Deputy Leader. There is little evidence that being in government has moderated the party’s views or cost them electorally.

The three far-right Nordic parties all have different origin stories with the Sweden Democrats, who have neo-Nazi roots being the nastiest, but all remain protest parties at heart with little suitability for governing. From their rabidly anti-immigrant stance, to being anti-EU and promoting populist spending policies the three parties have little in the way of sensible policies to bring to the table of coalition politics.

That is why Sweden, rather than depending on the Sweden Democrats, must opt for a grand coalition of the Social Democrats and Moderates, with support from one or two of the smaller parties. This is both possible and desirable, if difficult and unprecedented outside of wartime.

What should this government of national unity do? Its focus should be on narrow but deep structural reforms in five areas where Sweden faces the biggest challenges. Addressing these needs the best of both what the left and the right have to offer. Giving the Sweden Democrats, who have little sensible to say on any of these matters, influence will only make things worse.

It must reform the vulnerable and dysfunctional housing market, one of the most overheated according to the IMF. A combination of large scale public and private new construction, loosening of rent-controls, introduction of land value taxes, elimination of mortgage tax deductibility and tightening mortgage criteria is the only sensible way forward but would need a bold majority government behind it.

It must focus on improving falling education standards rather than endlessly debating private or public provision. For this, better incentives for teachers, more money for schools, and caps on profit extraction are sensible next steps. Introducing a life-long learning program could help provide a much-needed boost to stagnating productivity.

Efforts to integrate refugees must be strengthened by allowing them to seek work even as their claims are processed, tax subsidies for jobs, more spending on their education and training, targeted business apprenticeship programs and stricter anti-discrimination policies in the labour market. Many of these tools can also be usefully deployed to offer better opportunities to second-generation immigrants, who often find the dice is loaded against them.

The healthcare system though still good, is creaking at the edges. Only a thorough modernisation program that seeks to level the visible inequity between the public and private systems, even as it deploys technology and seeks lessons from healthcare reform from other developed and developing economies would prepare the system for the coming demographic challenges. More spending may also be necessary.

Last but not the least, shifting the tax burden away from wages and entrepreneurship towards land value, wealth and environmental taxes would provide a welcome boost to the economy and help address rising inequality.

Go on Sweden, put country above party.