Senegal's Sufi Mouride Brotherhood will inaugurate a mosque that can hold 30,000 worshippers, described as the largest in West Africa, in the capital Dakar on Friday.
Work on the Massalikul Jinaan mosque, which means "the Paths to Paradise", began a decade ago on a swampy six-hectare site in the poor area of Bopp, on land donated by the government of the majority Muslim nation.
The name is derived from the title of a poem by Sheikh Ahmadou Bamba Mbacke, the 19th-century founder of the Brotherhood, who is revered by followers as a Sufi
Based in the city of Touba, the movement is a pillar of Senegal's reputation for religious tolerance.
Mouride derives from the Arabic word for "one who desires to learn". The Brotherhood preaches service to humanity and upholding the principles of Islam.
The movement also holds considerable economic and political influence in Senegal and in neighbouring Gambia.
With a Carrara marble exterior and five minarets, the tallest of which is 78 metres, the mosque has a capacity of 15,000 worshippers inside and another 15,000 in an outside esplanade.
On Wednesday, spectators were already gathering for the opening. Some slept on the floor while painters on worked on the oriental-style decorations of the main door.
Uniformed police were also already visible. On Thursday and Friday, about 1,600 officers will be posted around the mosque site as tens of thousands of visitors are expected to fill the streets.
The massive building embodies the Brotherhood's rise, researcher Cheikh Gueye said.
The interior includes a gold-leaf dome, giant chandeliers and decorations hand drawn by Moroccan workmen.
"With this jewel, we are on a par with what we see in Arab countries and other places in Africa," said Mbackiyou Faye, who co-ordinated the building work.
The cost exceeded $33 million (Dh121.2m), all of which came from donations, Mr Faye said.
The government provided $11.5m for lighting, sanitation and road works, Infrastructure Minister Oumar Youm said.
The mosque is smaller than Casablanca's Hassan II, which is spread over nine hectares, can accommodate 105,000 worshippers and has a minaret spiralling 210 metres.
Another mosque being built in Algiers covers nine hectares with a 265-metre minaret. It will be able to accommodate 120,000 people.
The Mourides are one of four important Sufi brotherhoods followed by Senegal's Muslims, who practise moderate Islam while following the teachings of local spiritual guides.
The mosque will be inaugurated in the presence of President Macky Sall. An Islamic institute, residence and museum are to be added in the future.