Voters in Madagascar, one of the poorest countries in the world despite vast natural resources, head to the polls to elect a president on November 9.
Eleven of the 13 presidential candidates in the running had called on supporters to march on the central May 13 square to protest against what they have described as an "institutional coup" to favor incumbent Andry Rajoelina.
But law enforcement officers moved to disperse the crowd of a few hundred people before it reached the planned destination.
Former president and leading opposition figure Marc Ravalomanana, who was among the protesters, was led away to safety by his security detail.
The rally was not given the green light by authorities and hundreds of security forces patrolled the city center in the morning.
Rajoelina, 49, resigned last month in line with the constitution in order to run for re-election.
The president of the Senate was supposed to take over but declined for "personal reasons," leaving the task to a "collegial government" headed by Prime Minister Christian Ntsay, an ally of Rajoelina.
The move was accepted by the country's top court, sparking the anger of the opposition.
The court has also dismissed appeals to have Rajoelina's candidacy declared void over his dual French nationality.
On Sunday, Rajoelina accused his opponents of creating a political crisis "from scratch" because they were "not ready" for the vote.
"There is no crisis in Madagascar," he said in a televised address.
Forum