Afghanistan has expressed concern over a possible increase in violence in the region after the killing of an Iranian general in Iraq on Friday, the government said in a statement.

Afghanistan called on its neighbour Iran and the United States, its strategic partner, to prevent conflict escalations.

"Today, during talks with the US Secretary of State, I once again emphasized that Afghan soil must not be used against a third country or in regional conflicts," Afghan President Ashraf Ghani tweeted on Friday evening after a phone call with Mike Pompeo.

The statement on Friday comes after the attack earlier that day that killed Qassem Soleimani, head of Iran's elite Quds Force, and Abu Mahdi al-Muhandis, deputy commander of the Popular Mobilisation Forces (PMF, or Hashd al-Shaabi), an Iran-backed umbrella organisation comprising several militias, along with several other people.

Afghanistan's chief executive Abdullah Abdullah said he hoped that "the recent events will not have a negative effect on the cooperation between our friends and allies in Afghanistan".

Former Afghanistan president Hamid Karzai also took to Twitter to call for calm between the countries.

"Iran and Afghanistan, despite US military presence in Afghanistan, have maintained cordial and brotherly relations," Karzai wrote on Saturday. "In the face of the current challenges, we hope Iran will continue its wise and friendly approach towards Afghanistan."

Washington is Afghanistan's strategic ally, with the US having military presence in the country for nearly two decades.

Tehran has for years hosted millions of Afghan refugees.