Things could turns nasty in Zimbabwe over the next few days. Troops have been mobilised on to the streets of Harare and other population centres. It is the surest sign that President Robert Mugabe knows that he is heading for a massive drubbing in tomorrow's elections. But though he will almost certainly lose the vote, he knows he will win the election. Three million surplus ballot papers have been printed in preparation for the ballot-stuffing frauds with which Mr Mugabe has cheated the Zimbabwe electorate in the past.

All the signs from opinion polls, both public and private, are that the leader of the MDC opposition, Morgan Tsvangirai, is in the lead with between 30 and 40 per cent. Second, with about 20 per cent, comes Simba Makoni, who quit as Mr Mugabe's finance minister in 2002, and who many expected to present a greater threat to his former boss than Mr Tsvangirai who is generally believed to have won the last election, before the fiddling began.

Mr Mugabe is said to have only about 10 per cent of voters committed to him – hardly a surprise since he has presided over economic chaos with inflation at 100,000 per cent, unemployment at 80 per cent and life expectancy that has plummeted to among the lowest in the world. Zimbabwe, once southern Africa's breadbasket, is now ranked 151st out of 175 countries in the UN poverty index. Even basic commodities such as bread and cooking oil are now hard to come by. More Zimbabweans have died from the combined effects of malnutrition, crumbling health care and Aids than have perished in Darfur. It can't even be said Mr Mugabe has turned his nation into a banana republic since the banana has become a luxury commodity costing billions of Zimbabwean dollars.

Download the new Independent Premium app Sharing the full story, not just the headlines

What happens next depends in part on how blatant is the ballot-rigging. Mr Mugabe needs 51 per cent of the vote to win, a figure he might struggle to achieve even by ballot-stuffing, given the collapse of Zimbabwe's infrastructure. He might have to resort to arranging for ballot boxes from opposition strongholds to go missing, as happened in Kenya. If the opposition reacts with mass demonstrations on the streets, the Mugabe regime could react with a security clampdown, arrests, beatings and torture, as in the past.

The international community needs a co-ordinated reaction to a rigged vote. Members of the African Union must take the lead in issuing, along with the European Union and United States, a joint statement withholding recognition of the results. They then need to crank up the kind of concerted intervention, fronted by a high-level African Union mediation mission, as happened in Kenya. Its aim must be to assist the negotiation of a power-sharing agreement to set up a transitional government in advance of new elections. Rich nations must outline a package of economic and political assistance which would be made available to any government of national unity from which Mr Mugabe is excluded.

Keeping this together will be difficult. It was tricky in Kenya, taking many weeks for Kofi Annan to negotiate, and it will be even trickier in Zimbabwe. But there are reasons for optimism. South Africa may well take a harder line; last year's long mediation attempt by Thabo Mbeki failed, and the new chairman of the ANC, Jacob Zuma, has been more critical of Mr Mugabe than Mr Mbeki was in the past; members of his trade union power base picket the Zimbabwean embassy in Pretoria every day.

If such tactics fail, then the only option will be to intensify targeted sanctions against Mr Mugabe and those of his cronies blocking a political settlement.