On June 21, as Iraqi ground forces neared the center of Mosul's Old City, Islamic State fighters detonated explosives and destroyed the al-Nuri Grand Mosque.

For eight centuries, the building symbolized Mosul, which is why, in June 2014, ISIS senior commander Abu Bakr al-Baghdadi proclaimed the ISIS caliphate from a Grand Mosque balcony. Speaking freely in the great house of worship demonstrated Al-Baghdadi's control of Mosul. As an internet propaganda tool, video of his declaration confirmed he was a caliph, the religious-political ruler of an expanding militant Islamist territorial state.

In retrospect, the mosque's obliteration was indisputable evidence of terrorists' political nihilism. ISIS leaders really worship power and if they cannot seize power and hold it, then they will destroy Muslim shrines and cities as well as murder human beings en masse.

For many reasons, Iraq's battle to free Mosul and its environs was long, agonizing and bloody. ISIS controlled a lot of territory. In June 2014, ISIS attacked northern Iraq from bases in Syria. They seized portions Saladin, Diyala and Ninewa provinces. Mosul, Ninewa's capital and Iraq's second largest city, fell on June 10. ISIS fighters also attacked towns in Anbar province. Eventually ISIS controlled Iraqi territory with a population of four and a half million (though a million managed to escape ISIS oppression).

The ISIS offensive also battered the Iraqi Army, completely destroying several units in the north. Kurdish militias managed to halt ISIS attacks east and north of Mosul. The Iraqi government used the army's best units to defend Baghdad. Allied air support helped stall the ISIS offensive.

To stem 2014's crisis, Iraq took a political risk and organized Popular Mobilization Force militias. Several PMF units were (and still are) large Shia Muslim militias with ties to Iran.

Iraq had to build a new army to defeat ISIS, one that could work with the militias but also fight urban battles. Urban warfare is complicated. For example, it requires combat engineers capable of clearing mines and removing obstacles while under fire. Foreign advisers can help control artillery and air support, but Iraqi officers and their units had to learn how and when to use heavy firepower, and use it at close quarters. Civilian casualties were a major concern. The Iraqi government promised to limit casualties as much as possible, even though ISIS had turned Iraqi cities into fortresses.

Training and equipping Iraqi forces for these missions took time. The U.S. and other coalition partners supplied both training and equipment.

When Iraq began attacking ISIS in 2015. The Mosul offensive officially began in October 2016. Mosul was officially liberated in mid-July 2017, though sporadic fighting continued around the area.

On August 31, the city of Tal Afar (west of Mosul) fell to Iraqi forces. On November 17, ISIS fighters fled the town of Rawa (in Anbar, near the Syrian border). Rawa was the last Iraqi town of any size under Islamic State control. This week, American sources in the U.S.-led coalition estimated 99 percent of Iraqi territory ISIS seized has been liberated. ISIS, however, still holds some territory in Syria.

The Iraqi government, the coalition, the UN Assistance Mission for Iraq and several human rights groups have tried to keep accurate casualty figures for the campaign. The UN reports are issued on a monthly basis. Last week the blog "Musings In Iraq" summarized UN and media figures. Since the Iraqi offensive's official start date in October 2016, 21,224 have been killed and 30,996 wounded in Ninewa province. Of the dead, 17,404 were killed in devastated Mosul and 24,580 were wounded in the city fight. How many of the dead were executed by ISIS? The estimate is 5,325.

This isn't the last word on casualties. Investigators will find more graves.

On November 2, UN investigators accused ISIS of committing crimes against humanity in Mosul. During the campaign, ISIS used "thousands (of human beings) as human shields," intentionally shelled civilian homes and indiscriminately targeted "civilians trying to flee the city."

Unfortunately, the UN's condemnation isn't the last word on ISIS' hideous crimes.