FILE PHOTO: Mullah Abdul Ghani Baradar, the leader of the Taliban delegation, and Zalmay Khalilzad, U.S. envoy for peace in Afghanistan, shake hands after signing an agreement at a ceremony between members of Afghanistan's Taliban and the U.S. in Doha, Qatar, February 29, 2020. REUTERS/Ibraheem al Omari/File Photo

DUBAI (Reuters) - This weekend’s agreement between the United States and Taliban insurgents has no legal standing, Iran said on Sunday, dismissing the deal as a pretext to legitimize the presence of U.S. troops in Afghanistan.

The United States signed the deal on Saturday in a move trumpeted as a stepping stone toward a full withdrawal of foreign soldiers from Afghanistan and an end to 18 years of conflict in the war-torn nation, though some observers described it as a foreign policy gamble that could give the Taliban international legitimacy.

“The United States has no legal standing to sign a peace agreement or to determine the future of Afghanistan,” the Iranian Foreign Ministry said a statement reported by state media.

Iran views the U.S. move as an attempt to “legitimize its troops’ presence in Afghanistan”, the statement said.

While saying it welcomes any initiative that helps to secure stability and peace in Afghanistan, Iran said that will be possible only through domestic talks and consideration of the interests of Afghanistan’s neighbors.

Repeating its demand for the withdrawal of foreign forces from Afghanistan, Tehran said it will take all necessary steps to ensure the departure of the U.S. forces. The statement did not elaborate.