Protesters demanding the departure of Senegal's ageing president have seized control of a three-block stretch in central Dakar, erecting barricades and lobbing rocks at police days before a presidential poll.

It was the fifth day of violent protests before the vote. President Abdoulaye Wade, 85, is insisting on running again despite the deepening unrest and calls from France and the US to hand power to the next generation.

Sunday's clashes marked a worrying development because they took on a religious dimension. Hundreds had gathered outside a mosque as religious leaders met to discuss a incident on Friday in which police used grenade launchers to fire teargas.

Footage shown on Senegalese TV indicated that the police had not shot inside the mosque but outside, where a crowd had gathered. But the gas enveloped worshippers inside and outside the shrine.

On Sunday morning as the crowd outside the mosque grew larger, riot police took a defensive position at one end of the street. Dozens of young people jeered before grabbing cinderblocks from a nearby construction site, smashing them on the pavement in order to make smaller projectiles which they hurled at police. Security forces responded by firing teargas canisters.

The two sides sparred for more than an hour, by which time the protesters had seized control of a three-block stretch of Lamine Gueye, one of two mainavenues traversing downtown Dakar. The protesters used market tables and plywood that had been nailed across shop windows to shield themselves from the teargas canisters.

Each time the protesters charged the police, they screamed: "There is no God but Allah." Such religious phrases that are rarely heard in Senagal, a country in which more than 90% of the population are Muslim but also which has long embraced secularurism.

"I'm worried, yes. What I'm seeing here could really degenerate into another kind of situation, a religious one," said Moustapha Faye, a member of the Mouride Muslim brotherhood, which owns the mosque, as he stood behind police lines. "We must absolutely avoid violence."

The violence has raised concerns that worse unrest will follow if Wade is declared the winner of next Sunday's vote. In power for 12 years, he oversaw a revision to the constitution in 2001 which imposed a two-term maximum on the presidency. But he later argued that the amendment was not retroactive and did apply to him.

Senegal has had regular protests since January, when the country's highest court ruled that Wade was eligible to run for a third term. He has described the protests as nothing more than a "light breeze which rustles the leaves of a tree, but never becomes a hurricane".