As American troops began exiting Iraq, Iran’s Supreme Leader Ayatollah Khamenei said the U.S. finally has been “forced” to leave Iraq.

Iranian media report that Ayatollah Khamenei told Masoud Barezani, the head of Iraq’s Kurdistan Regional Government, in a meeting on Sunday: “The integrated resistance of all ethnic and religious groups in Iraq against the occupiers” has finally forced U.S. forces out of Iraq.

Ayatollah Khamenei referred to the “opposition of various Iraqi groups to the plan for judicial immunity for U.S. troops in Iraqi territory,” saying that the “unity of Iraqi groups” led to the exit of the military forces.

Earlier this month, U.S. President Barack Obama announced that all US troops will leave Iraq by the end of this year.

U.S. troops together with a few thousand British troops entered Iraq eight years ago to topple Saddam Hussein’s regime.

U.S. media reported that the operation to leave Iraq has begun and U.S. authorities have indicated that it will take about two months for U.S. troops to be transferred to Kuwait and then returned to the United States.

The Fars News Agency reports that Ayatollah Khamenei told Barezani: “It is now time for all Iraqi ethnic and religious groups to build a new Iraq side by side so that this country can find its true position.”

Barezani also reportedly told Iran’s leader that his country will never forget Iran’s assistance to its people and government, especially in the difficult days, and went on to refer to Iran as “the good and close friend of the Iraqi people.”