Faced with the imminent loss of the beating heart of their Iraqi stronghold of Mosul, ISIS militants appear to have made a drastic decision: they just blew it up.

The Iraqi Security Forces, backed by steady support from the U.S.-led coalition to defeat ISIS as part of Operation Inherent Resolve, have steadily pushed toward the centuries-old Grand al-Nuri Mosque in Mosul’s old city, the very site at which ISIS leader Abu Bakr al-Baghdadi declared his so-called caliphate in August 2014. According to Reuters, members of the ISF’s elite Counter Terrorism Forces were within 300 yards of the building as of the morning of June 21.

For ISIS to opt to blow up the “Hunchback,” as the mosque was known, suggests that the terror group is sounding the death rattle in the strategically important city. The building was both an ancient Mosul landmark — its leaning minaret had towered over the city for hundreds of years— and an architectural symbol of the ISIS caliphate. The group’s black flag has reportedly flown from its walls ever since militants overran the city in a lightning assault during the summer of 2014. Not anymore.

ISIS, through its Amaq News Agency, has blamed the mosque’s destruction on a U.S. airstrike, and while details are still emerging, the group’s track record would suggest otherwise. ISIS has has made a habit of destroying antiquities of historical and cultural significance, including parts of the ruins in the ancient Syrian city of Palmyra. And the group had reportedly threatened to destroy the al-Nuri Mosque’s minaret at least once before.

In a statement, OIR commander Lt. Gen. Stephen Townsend refuted the allegation, calling the destruction of the mosque by ISIS forces  “another example that ISIS is cruel, heartless, and godless ideology that cannot be permitted to exist in this world.”

That the militants chose to destroy al-Nuri now indicates even they are aware of how close they are to defeat in Mosul.

Three years after al-Baghdadi established his “caliphate,” ISIS’s fortunes have taken a hard turn for the worse. The Iraqi Security Forces and U.S.-led coalition have carried out a grinding eight-month battle to retake the city, once the country’s second largest. The U.S.-led coalition has played a crucial role in the fight, hammering ISIS positions with repeated air and mortar strikes and deploying forces in “advise and assist” roles in and around Mosul. U.S. troop levels in Iraq have steadily increased since the beginning of the siege back in October; there are now reportedly around 6,000 U.S. troops in the country.

The fight for the city has been a brutal, street-by-street slog through avenues loaded with ISIS snipers, booby traps and roaming VBIEDS. While the ISF conquered the city’s eastern half within a few months, the fight for the western half has dragged on. There, ISIS fighters have retreated to the old city, a dense network of winding streets and narrow alleyways, the worst kind of place to hunt down militants.

The group’s fate in Mosul is nearly sealed. According to Iraqi army officials, only about 300 fighters remain in the city — just 5 percent of its initial strength. Increasing squeezed into the labyrinth of the old city, the group has put up staunch resistance throughout the course of the battle. But facing a vastly stronger opponent, one capable of raining hellfire from the sky, it’s really only a matter of time before the group completely loses its grip on Mosul.