Hundreds of thousands of people from across Senegal converged on the capital Dakar on Friday for the inauguration of a huge mosque, claimed to be the largest in West Africa.
Muslim faithful arrived by bus, car or on foot in the poor district of Bopp, home to the new Massalikul Jinaan mosque, capable of hosting 30,000 worshippers.
The mosque has been built by the Mouride Brotherhood -- part of the Sufi strand of Islam that predominates in Senegal, a country with a long tradition of religious tolerance.
Huge traffic jams several kilometres (miles) long built up on highways leading to the site, where some people had starting camping out two days before the long-awaited ceremonies.
Thousands of women in colourful robes, men dressed in festive white along with children packed the streets.
"I'm here to celebrate God, the Prophet and Serigne Touba, (one of the holy names used for the brotherhood's founder) whose work is being rewarded here," said Malick Mar, a mechanic who was among the worshippers.
"It is a triumph for all Muslims."
When the mosque guards opened the mosque's doors, there was a frenzied rush and worried police used electric batons to try to restore order. Unable to get inside, thousands of faithful unrolled their prayer mats on the mosque's outside esplanade.
Work on the mosque began a decade ago on a swampy six-hectare (14-acre) area of land donated by the government of the 90-percent Muslim nation, and the inauguration has been preceded by an outpouring of national and religious fervour.
The mosque's name of Massalikul Jinaan ("The Paths to Paradise") comes 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 saint.
With a Carrara marble exterior and boasting five minarets -- the tallest 78 metres (255 feet) high -- the mosque has a capacity of 15,000 worshippers inside, and another 15,000 on the esplanade.
The lavish interiors include a gold-leaf dome, giant chandeliers and decorations hand drawn by Moroccan workmen. An Islamic institute, residence and museum are scheduled to be added in the future.
The builders say the mosque is the biggest in West Africa, although the edifice is dwarfed by mosques in the Arab world. In Morocco, the Hassan II mosque in Casablanca can accommodate 105,000 worshippers and has a minaret spiralling 210 metres.
The cost of more than 30 million euros ($33 million) came from private donations, while the government contributed lighting, sanitation and roadworks worth 10.5 million euros as well as the land -- a sign of the Brotherhood's clout.
The group's leader, Mountakha Mbacke, received a stream of religious, traditional and political leaders in the run-up to the inauguration.
The ceremonies were also attended by President Macky Sall and former leader Abdoulaye Wade, who shook hands after a long period of frosty relations.
The Mourides are one of four important Sufi brotherhoods followed by Senegal's Muslims, who overwhelmingly practise a moderate version of Islam while following the teachings of local spiritual guides.