“AS BAD as having no government is having a government that can’t govern,” the Spanish prime minister, Mariano Rajoy, told parliament in October, just before the vote that gave him a mandate to form a new administration. Spain had grown rather used to the former situation: it spent ten months in a state of limbo, as two elections delivered parliaments so fragmented that no party could broker a coalition. It is a step forward that Mr Rajoy has been able to form a minority government. But as he foresaw, governing is not going to be easy.

The parliamentary arithmetic is unforgiving. Mr Rajoy’s conservative People’s Party (PP) has 137 of the 350 seats in the Cortes (parliament). It has the support of the 32 legislators of Ciudadanos, a liberal party. To pass laws, it must either scrape together seven further votes from Basque nationalists and Canarian regionalists (who want more autonomy for the Canary Islands), or hope the opposition Socialists abstain.

The first big test is next year’s budget. The government faces contrasting pressures. It has promised the European Commission that it will cut the fiscal deficit from 4.6% this year to 3.1% in 2017. But the PP agreed with Ciudadanos to increase spending on job training and reverse some cuts. It also faces pressure from cash-strapped (and often spendthrift) regional governments. The answer, in the draft budget approved by the cabinet, has been to close loopholes in corporate tax, which officials hope will provide most of the extra €4.8bn ($5.1bn) in needed revenue in 2017. To win the acquiescence of the Socialists, the government set a slightly less strict deficit target for the regions and approved a rise in the monthly minimum wage from €655 to €708, the biggest in 30 years.

The underlying question is whether such a weak government can take the measures needed to sustain the country’s economic recovery. Political uncertainty has already damaged investment, business and consumer confidence, and growth, says Rafael Domenech, an economist at BBVA, a bank. He expects a tighter fiscal policy, Brexit and further uncertainty to trim growth from 3% this year to 2.5% next. With Spain’s public debt at 100% of GDP, he worries that the country will be hit by an increase in international interest rates before it has the deficit under control.

Pablo Casado, a PP official, reels off a list of measures on the government’s agenda, including laws to boost competitiveness and to make all levels of the state more efficient, as well as seeking cross-party pacts on education and the financing of regional governments. But he admits that the government will have a fight on its hands just to prevent malcontents from repealing its past reforms of the labour market and education. Already it has been forced by the Cortes to drop new school tests that were part of its educational reform of 2013.

For Mr Rajoy, who enjoyed an absolute majority in 2011-15, the need to negotiate with opponents is a big change. But he is not under threat of eviction from the Moncloa, the prime-ministerial compound. To topple a government, the constitution requires a majority vote for an alternative one, something a divided opposition is unlikely to muster. And many opposition motions will be deflected into the long grass of parliamentary subcommittees.

Some in Madrid think the prime minister will be happy to trundle on like this through the remainder of this parliament’s term. “He is not a great reformist,” says Lorenzo Bernaldo de Quirós of Freemarket, a consultancy. “He is a conservative in the strict sense of the word, who favours the status quo.” Others think Mr Rajoy will seize the right moment in the next year or two to call a fresh election at which he can hope to come closer to a majority. Either way, the prime minister’s position is less weak than it looks. Indeed, compared to most countries in western Europe, Spain is starting to look like an island of relative political stability.