Afghanistan has overtaken Iraq to become the world’s deadliest country for terrorism, according to a report released Wednesday.

One-quarter of all worldwide terrorism-related deaths during 2017 occurred in Afghanistan, according to the latest Global Terrorism Index. It cited a surge in attacks by the Taliban and the Islamic State group.

America's longest war began after the 9/11 attacks when the U.S. invaded Afghanistan and toppled the ruling Taliban, which was sheltering Al Qaeda leader Osama bin Laden. The country still hosts around 14,000 U.S. troops, although President Donald Trump has expressed impatience with the military mission.

In total, Afghanistan endured 4,653 fatalities across 1,168 terrorist incidents last year, the report said. The Taliban was responsible for 77 percent of them.

However, worldwide deaths linked to terrorism fell for the third consecutive year, according to the report published by the Australian-based Institute for Economics and Peace think tank.

U.S. officials are keen to bring the Taliban into an peace deal in case Trump pulls the plug on the current American military mission before the presidential election in November 2020.

Defense Secretary Jim Mattis paid a surprise visit to Kabul on Sept. 7 to encourage peace talks between the Afghan government and the Taliban.

A sandal lies on the ground after a suicide bombing near Kabul University on March 21. Shah Marai / AFP - Getty Images

Almost 2,400 Americans have died in Afghanistan since 2001.

While ISIS remained the deadliest terrorist group globally in 2017, the report also highlighted that the threat of far-right violence is on the rise.