Part of the mosque, built by Bouygues and inaugurated in 1993, overlooks the Atlantic Ocean, was reported in 2002 to have "pillars threatening to collapse, cracked concrete and ruptured steel".

The mosque is the second biggest in the world, after al-Haram al-Makki Mosque in the holy city of Makka in Saudi Arabia.

"The work will consist of reinforcing beams in the part of the Hasan II mosque that is exposed to the sea and has undergone a few structural changes," the city's urban planning department was quoted by L'Economiste as saying on Monday.

The work is expected to take three months. The threat to the mosque, which took six years to build, was first reported in 2000.

Two years later, the city council dismissed "alarmist" media stories, stating the only section of the building at risk was "part of the esplanade overhanging the sea".

Signs of damage were "typical of all constructions subject to the physical and chemical aggression of the maritime environment and are the object of appropriate and permanent maintenance," said the city council.

The large cost of building the grand mosque during the reign of King Muhammad VI's late father has never been disclosed, but is estimated at between $500-800 million.

It was in part paid for by a national subscription scheme which led to a lot of criticism in the impoverished nation.

The mosque can accommodate about 25000 people in its prayer hall and is also a major tourist attraction.