Iran's foreign ministry spokesman says his country will fully back the U.S.-Iraq security pact if it's approved by Iraqis in a referendum next summer.

Hasan Qashqavi says Iran will agree to "any decision the Iraqi people reach in the referendum." The vote is to be held by July 30.

Qashqavi's comments Monday were the first official reaction and endorsement of the deal from Tehran. Iran has long criticized the pact but recently softened its stance — particularly after the deal affirmed Iraq's territory cannot be used for attacks on neighboring states.

The deal, approved by Iraq's parliament last week, requires American troops leave Iraq in three years. It must also be signed by the Iraqi presidential council and put to a nationwide referendum.