The demolition, set to the strains of a rousing nasheed, or Islamic chant, and attended by the group's top commanders, underscored Islamic State's claim of creating a "caliphate" based on religion, not national borders.
It also marked the merging of the wars raging through Syria and Iraq and granted the group a sanctuary where it could lick its wounds before mounting fresh attacks on both sides of the Iraqi-Syrian border.
That hole in the berm is now blocked, the militants (at least on the Iraqi side) chased away. In their stead, fighters with the Shiite-dominated auxiliary force known as the Hashd al Shaabi, or Popular Mobilization Units, maintain a lonely vigil over this desolate corner of the desert, their weapons trained upon Islamic State positions on the very edge of Syria.
Their operation to secure the 372-mile border, they say, is an essential component in the fight against the jihadists. Capturing the site that Islamic State bulldozed with such fanfare is an achievement, but it raises other delicate issues: bickering has broken out among the local forces that have united against Islamic State. Also, the presence of the Hashd has irked Washington and its regional allies, who view the Hashd as a stand-in force for Iran.
Last month, the Hashd launched an offensive against Islamic State's supply lines west of Mosul and was able to claw back part of the surrounding Nineveh province from Islamic State's dwindling caliphate. The Hashd also captured the town of Baaj, a sand-swept outpost 81 miles southwest of Mosul thought to be the hideout of Islamic State leader Abu Bakr Baghdadi. (The Russian military said Friday it was investigating whether an airstrike in the Syrian desert killed Baghdadi in May.)
The Hashd fighters then grabbed more areas near the border, occasionally pursuing the militants into Syrian territory, reports said, before returning to the Iraqi side of the berm.
Along the berm, Hashd positions — fluorescent swaths of color from pup tents set up near battered military vehicles — broke the endless desert brown every 200 yards or so.
Last week, the fighters had reached the crossing was where Islamic State had filmed its infamous video.The symbolism was not lost on the irregulars, including Abdul Wahad Ibrahim, a blue-eyed 60-year-old Hashd fighter resting on the berm.
"The Hashd has broken the banner of Daesh here, and we'll continue and do the same over the rest of the border," said Ibrahim, using an Arabic acronym, considered perjorative, for Islamic State. "This will cut its breathing space."
But the militants are still close by. As the fighters were plugging the hole in the berm, Ibrahim said, Islamic State attacked their bulldozers with a rocket launched from a row of squat, white buildings less than a mile away in Syrian territory.
The Hashd also found signs of Islamic State in the berm itself. Armed with sniper rifles and heavy machine guns, the fighters had also dug holes in the berm to hide from Iraqi helicopters running sorties.
The Hashd's arrival was the first time pro-government forces had reached this area since Islamic State overran northern Iraq more than three years ago.
Though the towns and villages now stand abandoned, vestiges of the group's presence could still be seen: A poster asking militants' families to renew their information to receive payments; a road sign directing drivers on a dirt road toward "Sham," a reference to Syria; colorful graffiti exhorting people to pray.
"This area has been part of the headquarters for the Daesh. If we don't clean it up, it will come back," said Yazan Meshan Juboori, the Hashd's political advisor, adding that the operation was launched with the blessing of Iraqi Prime Minister Haider Abadi.
Once the border is secured, Juboori said, it will be handed over to Iraq's border guards. (The U.S., according to coalition spokesman Col. Ryan Dillon, has trained about 5,000 border guards and will supply them in the coming months with "police in a box" units, prefabricated outposts that come equipped with weapons and uniforms.)
But, Juboori continued, Hashd fighters will remain in place and support the border guards "as long as Syria remains unstable."
That plan has stoked fears of a so-called Shiite crescent extending from Iran to Lebanon. Critics say it would give a powerful boost to Syrian President
This month, the Syrian army and a number of pro-government militias raced from central Syria across the desert and linked up with the Hashd, in what the Syrian army's General Command called a "strategic turning point in the war on terror" in a statement on Saturday.
"This will tighten the noose on what remains of the groupings of Daesh in the area and cuts the supply lines of the organization in more than one direction," the statement said.
But U.S.-backed Kurdish groups on both sides of the border have been less welcoming.
"If Hashd forces attempt to enter our areas, our forces will fight them," said Talal Sillo, spokesman for the Syrian Democratic Forces, or SDF, in an interview with media outlet Kurdistan24 last month.
The SDF is a U.S.-backed coalition composed of Kurdish and Arab militiamen who dominate northeastern Syria. They are involved in a large-scale offensive on Islamic State's de facto Syrian capital, Raqqah.
The Kurds and Iraqi government have long been at odds, but Kurdish fighting forces known as the peshmerga participated in the run-up to the Mosul offensive on the basis of a vague agreement with Baghdad. As the Kurds see it, some of the border areas in northwestern Iraq now controlled by Hashd would someday come under the administration of the semiautonomous Kurdistan Regional Government, and would presumably be included in any future Kurdish state.
The Hashd's advance pushed Kurdish President Massoud Barzani to complain in a meeting with the head of U.S. Central Command, Gen. Joseph Votel, this month that the Hashd shouldn't take control of the area — and that its presence goes against the spirit of the agreement the Kurds helped craft in Baghdad.
Others question how the Hashd will behave once those local populations uprooted by its offensive return. Many fear the Shiite fighters will engage in sectarian-fueled vengeance against Sunni communities, who were thought to give at least tacit support to Islamic State.
"First they remove the military-age males from the environment, and then they set the price for them to come back," said Michael Knights, an analyst with the Washington Institute for Near East Policy.
"Will they have to join the PMUs [Popular Mobilization Units]? Do you get a Sunni Hashd there? Do they have to pay compensation? Do they have to hand over a certain number of their sons for summary judgment?"
Left unchecked, the tensions will lead to Islamic State (or its future iteration) to take advantage of the lack of cooperation to rise again, said Renad Mansour, an Iraq expert with the U.K.-based Chatham House think tank.
"Now everyone is attacking ISIS on both sides of the border so it can't regroup. But in two or three years?" said Mansour in a phone interview.
Even if jihadist forces are driven out of the border region, the underlying beliefs and tensions that gave to Islamic State might still remain — and the border will remain a volatile place.
"I've ask all the political leaders in [northern Iraq], 'Are the roots that led to ISIS gone?'" Mansour said.
"Everyone says they haven't even been addressed."