THE point of elections is that their outcome should be uncertain. But everybody in Russia knows that Vladimir Putin, who is now prime minister, will be elected president on March 4th. This is not because he is overwhelmingly popular, but because his support will be supplemented by a potent mixture of vote-rigging and the debarring of all plausible alternative candidates.

The uncertainty will come after the election, not before. Developments in the past few months have shown that Mr Putin cannot rule his country indefinitely. The beginning of the end of his reign has begun (see article). Whether it is a good end or a bad one is up to him.

Putin's choice

When Mr Putin came to power 12 years ago, many Russians were grateful for the stability and prosperity he brought with him. The political chaos and drop in incomes after the collapse of the Soviet Union had soured their belief in democratic politics and encouraged them to focus on making money. Mr Putin rode high in the polls. To the rest of the world, Russia looked like a cynical society where people were interested only in personal wealth and national muscle.

But Russia is changing. A richer and more vocal middle class has sprung up, one that recognises Russia as an ill-governed kleptocracy. That became evident last September, when Mr Putin first announced his plan to return to the Kremlin by swapping jobs with Dmitry Medvedev, who was formally president even though Mr Putin retained ultimate control. Discontent began to rumble. The rigged parliamentary poll in early December was followed by street protests in Moscow and elsewhere. A demonstration in Moscow on February 4th got 100,000 people out in a temperature of -22°C. The protests have continued since then, and the demonstrators intend to keep going after Mr Putin's election, starting on the day after the vote.

Although dissatisfaction with the regime is most evident among the middle classes, older, poorer and less cosmopolitan Russians have been peeling away from Mr Putin too. Voters are fed up with corruption, disillusioned by his repeated failure to carry through promised reforms and increasingly sceptical of claims that his critics are all agents or accomplices of the West.

What happens next is largely Mr Putin's choice. He can respond to the pressure for change by trying to repress it, or by going with it. His past in the KGB, his record as an autocrat and his increasingly strident anti-Western rhetoric all suggest that he will lean towards the first course. So does the corruption that infuriates so many of the protesters. For Russia's rulers, corruption is not a happy side-effect of power, but the core of the system. A small group of people wholly above the law has, in the past decade, become rich beyond the wildest dreams of the tsars. Mr Putin's return to power would protect these ill-gotten gains. Reform would put them at risk.

But keeping Russia quiescent may prove difficult. Mr Putin succeeded in doing so for more than a decade partly because of rapid economic growth on the back of large real rises in oil prices. Oil and gas still make up two-thirds of Russia's exports. Yet growth has now slowed sharply. Shale-gas discoveries elsewhere in the world are dragging down the price of gas, and the oil price is unlikely to rise as fast in the future as it has in the past. Europe, Russia's largest market, is weak. Russia is suffering both capital flight and a brain drain. The working-age population is shrinking.

A new fiscal incontinence is aggravating these problems. At 40% of GDP, public spending is already high for a middle-income country. Mr Putin has made extravagant pre-election promises, adding up to as much as $160 billion to the budget, which will push this ratio even higher. His promises include large pay and pension increases for the armed forces, teachers and doctors. In 2012 alone he has pushed through a 33% rise in defence, security and police spending. The federal budget, which in 2007 achieved balance with oil prices at less than $30 a barrel, will soon need a figure closer to $130.

Nor is repression as easy to pull off as it once was. Mr Putin could ratchet up the pressure on those media that have actively supported the protesters, a process that has already begun with Ekho Moskvy, a liberal radio station, and Novaya Gazeta, a newspaper. But even he has admitted that he would struggle to censor the internet, which has a penetration rate of 50% in Russia (and over 70% in Moscow). He would find it equally hard to cow the whole of the resurgent middle class.

There is another way

Should Mr Putin choose instead the path of reform, he could start by promising not to run yet again in 2018, and also by offering to hold a fresh parliamentary election. He could—as he promised in a recent series of newspaper articles that read like an election manifesto—establish the rule of law and reform the economy. He could reinstate wholly free elections for regional governors as a step towards greater decentralisation of power. He could release Mikhail Khodorkovsky, the jailed former boss of the Yukos oil company. And instead of Mr Medvedev, his pawn, he could choose as prime minister a relative liberaliser such as Alexei Kudrin, a former finance minister who has sought to engage the protesters.

Such reforms would lead, one way or another, to the diminution of Mr Putin's power. But so, in a different way, would repression. If he cannot bring himself to reform the state or the economy, if he cannot harness middle-class desire for change, if he cannot see the demonstrations as anything more than a threat to be contained and crushed, then the prospect for President Putin's next term is grim indeed: protest, disillusion, repression and economic stagnation. Russia would be diminished, and so would its leader.

A wise man with a sense of his own destiny would now be thinking carefully about his legacy and his successor. Mr Putin has not displayed much wisdom in his time in power, but he is no fool. He faces a momentous choice, and history will not look kindly on him if he makes the wrong one.