The Islamic State leader, Abu Bakr al-Baghdadi, has been killed in a raid by US special forces on his Syrian safe house, Donald Trump has announced, ending a years-long hunt for one of the world’s most-wanted terrorists.

Trump said the “impeccable” two-hour operation was conducted on Saturday night in the province of Idlib, one of the few areas of the country still outside Syrian regime control, and that US officials had confirmed Baghdadi, 48, was among those killed.

“US special operations forces executed a dangerous and daring night-time raid in north-west Syria and accomplished their mission in grand style,” he said.

The US president, facing impeachment proceedings and under bipartisan fire for withdrawing troops from the Syrian border, basked in the demise of the self-styled caliphate leader, whose final moments he described in vivid, indulgent detail.

“[Baghdadi] running into a dead-end tunnel, whimpering and crying and screaming all the way,” Trump said.

Cornered, Baghdadi detonated a suicide vest and killed himself and three of his children, Trump said. “He died like a dog, he died like a coward. The world is now a much safer place,” he said.

Facebook Twitter Pinterest An aerial view of a site hit by helicopter gunfire near the north-western Syrian village of Barisha, where the US raid took place. Photograph: Omar Haj Kadour/AFP via Getty Images

World leaders welcomed the news of Baghdadi’s death but also struck notes of caution. Boris Johnson, the British prime minister, said: “The death of Baghdadi is an important moment in our fight against terror but the battle against the evil of Daesh [Isis] is not yet over.”

Trump said US forces were engaged with “massive firepower” as their helicopters arrived at the building where Baghdadi was sheltering with his family and associates.

“The compound had to be cleared at this time, with people either surrendering or being shot and killed,” he said. “Eleven young children were moved out of the house and are uninjured.

“The only ones remaining were Baghdadi in the tunnel, and he had dragged three of his young children with him. They were led to a certain death. He reached the end of the tunnel as our dogs chased him down.

“[Baghdadi] ignited his vest, killing himself and the three children. Test results gave certain, immediate and totally positive identification. It was him.”

The US president had presaged the news of Baghdadi’s death in characteristic style, inviting speculation by tweeting at 9.23pm on Saturday in Washington DC: “Something very big has just happened!”

Facebook Twitter Pinterest Donald Trump in the White House situation room with the national security adviser, Robert O’Brien, far left, and others. Photograph: Shealah Craighead/AP

Iraqi officials told the Guardian the hunt for Baghdadi had intensified over the past month since they identified a Syrian man who had moved his family members and wives from Iraq to Syria.

An Iraqi intelligence official said the wives of Baghdadi’s two brothers, Jumah and Ahmad, along with other family members, were monitored as they moved to the region. The information was passed to the CIA earlier this month, the officials said.

Profile Who was Abu Bakr al-Baghdadi? Show Hide Abu Bakr al-Baghdadi is thought to have been born in the central Iraqi city of Samarra in 1971. Though a weak student, whose poor eyesight disqualified him from joining the Iraqi military, he rose to command al-Qaeda’s Iraqi division and then broke away to form Islamic State (Isis). In July 2014, shortly after Isis said it had established a caliphate in Iraq and Syria, Baghdadi delivered a sermon from a mosque in the captured Iraqi city of Mosul. Appearing unmasked for the first time, he declared himself to be the caliph: the political and religious leader of the global Muslim community. His declaration was roundly rejected by almost all Islamic religious authorities but his caliphate became a magnet for thousands of foreign fighters and women. The group attempted not just to hold territory but to administer it like a state, establishing a brutal justice system, collecting taxes and doling out public services. Baghdadi had been seen publicly on one other occasion, in an 18-minute video released in April this year. From 2016 he had a $25m bounty on his head. He had been reported to have suffered serious injuries in airstrikes over the years, and there had occasionally been speculation that he had been killed, but he continued to resurface in audio tapes and videos. He killed himself in October 2019, while under attack from US forces. Michael Safi Photograph: -/AFP

Several Syrian rebel groups active in Idlib province said they had been asked by US officials over the past fortnight to establish whether senior Isis members were hiding in Idlib.

Diane Foley, whose son James was among those whose deaths were filmed for gruesome murder videos that became a trademark of Isis, said: “I am grateful to our president and brave troops for finding Isis leader Al-Bagdadi.

“I hope this will hinder the resurgence of terror groups and pray that captured Isis fighters will be brought to trial and held accountable.”

Trump mentioned Foley in the press conference as well as other American hostages killed in the group’s custody: Steven Sotloff, Peter Kassig and Kayla Mueller. He also referenced Muath al-Kasasbeh, the Jordanian pilot the terrorist group burned to death.

The US national security adviser, Robert O’Brien, said the operation to kill the Isis leader had been named after Mueller, a humanitarian worker who was imprisoned by the group, tortured and repeatedly sexually abused by Baghdadi. She died in Isis confinement at the age of 26.

Trump thanked the governments of Russia, Iraq, Syria and Turkey, as well as the Syrian Kurdish forces, for their assistance. US special forces reached the compound onboard eight helicopters that flew through Russian-controlled airspace with Moscow’s permission, he said, while the Kurds provided intelligence.

Trump said Baghdadi was “the biggest there is”, casting the operation as the US’s greatest counter-terrorism feat, greater even than the killing of the al-Qaida leader, Osama Bin Laden, under his predecessor, Barack Obama.

“Osama bin Laden was big, but Osama bin Laden became big with the World Trade Center,” Trump said. “This is a man who built a whole, as he would like to call it, a country.”

Baghdadi’s death is likely to be a significant fillip for Trump, who has faced withering criticism from Republicans and Democrats alike for withdrawing troops from north-eastern Syria, effectively allowing Turkey to move against the US’s Kurdish allies in the region.

Trump’s critics have claimed the Syrian pullout would allow Isis to resurge in Syria and pose a renewed threat to US interests – arguments that could be blunted by the latest operation, even if the risk from remnants of the militant group remains.

Facebook Twitter Pinterest A destroyed house near the village of Barisha in Idlib province, Syria, where the US military operation took place. Photograph: Ghaith Alsayed/AP

Baghdadi’s death is a devastating blow to a terror group that had run rampant across the region for five years from mid-2014, spawning gruesome terrorist attacks across the world, amplifying a mass refugee exodus and sparking a war to contain it that killed thousands of people and displaced millions more.

Throughout, Baghdadi remained the face of Isis: a fearsome, implacable ideologue who eluded the world’s intelligence agencies while continuing to incite a war of civilisations.

Though long speculated to be a possible hideout, Idlib had been thought by many regional officials to be too risky a proposition for Baghdadi, who was more accustomed to the deserts of Iraq, where his organisation had risen.

For days, US officials had feared Isis would seek to capitalise on the upheaval in Syria. But they also saw a potential opportunity in which Isis leaders might break from more secretive routines to communicate with operatives, potentially creating a chance for the US and its allies to detect them.