MOSUL, Iraq (AP) — Iraqi religious leaders have laid the cornerstone to rebuild Mosul's landmark al-Nuri mosque, which was blown up in the battle with Islamic State militants in 2017.

The mosque, also known as The Great Mosque of al-Nuri, and its iconic leaning minaret were built in the 12th century. It was from the mosque's pulpit that IS's self-styled caliph, Abu Bakar al-Baghdadi, declared the caliphate's establishment in 2014.

Iraqi forces defeated the extremist group in the last of its urban strongholds last year, recapturing Mosul in a fierce battle that saw the al-Nuri mosque destroyed.

Dignitaries from the E.U. and the U.N. attended the ceremony in the mosque's courtyard, where Abdulateef al-Humayim, head of Iraq's Sunni endowments, led the proceedings on Sunday.

The UAE donated $50.4 million to rebuild the mosque. Construction is expected to take five years.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.