DAMASCUS, Syria — Syrian President Bashar Assad authorized Iraqi forces on Sunday to attack the Islamic State group inside Syria without waiting for permission from authorities in Damascus, the state news agency SANA said, as the two allies coordinate their fight against extremists ahead of a planned U.S. withdrawal from Syria.

The announcement highlights the close relations between the two neighboring Arab countries that are both allied with Iran. ISIS once controlled large parts of both countries when it declared a caliphate in 2014.

Iraqi warplanes and artillery have in the past pounded ISIS positions inside Syria after getting the green light from Syrian authorities.

The extremists have been defeated in Iraq but still hold a small area in Syria close to the Iraqi border.

This file image made from undated video released by Iraq's Ministry of Defense on July 2, 2016, shows aerial images of purported air strikes on an Islamic State group convoy and militants, near Fallujah, Iraq. Syria’s state news agency said Sunday, Dec. 30, 2018 that President Bashar Assad has authorized Iraqi forces to attack the Islamic State group inside Syria without waiting for permission from authorities in Damascus. (Iraqi Ministry of Defense via AP)
This file image made from undated video released by Iraq's Ministry of Defense on July 2, 2016, shows aerial images of purported air strikes on an Islamic State group convoy and militants, near Fallujah, Iraq. Syria’s state news agency said Sunday, Dec. 30, 2018 that President Bashar Assad has authorized Iraqi forces to attack the Islamic State group inside Syria without waiting for permission from authorities in Damascus. (Iraqi Ministry of Defense via AP)

On Saturday Assad received a letter from Iraq's Prime Minister Abdul-Mahdi calling for both countries' coordination in "fighting terrorism."

President Donald Trump announced earlier this month that the U.S. will withdraw all of its 2,000 forces in Syria. The main U.S.-backed Kurdish-led Syrian Democratic Forces has expressed concerns that the U.S. plans to pull out could lead to the revival of ISIS, saying that the extremists have not been defeated yet in Syria.

In Washington, Sen. Lindsey Graham, R-S.C., said he is going to encourage Trump to sit down with generals and reconsider pulling troops from Syria.

“Slow this down, make sure that we get it right, make sure ISIS never comes back,” Graham said on CNN using a different acronym to refer to ISIS. “Don’t turn Syria over to the Iranians. That’s a nightmare for Israel.”

Graham said that it's possible for the U.S. to reduce its footprint in Afghanistan, Iraq and Syria, and that he supports the goal of having allies "do more and pay more." But he added that he also sees the U.S. military playing a role in all three countries for "a while to come."

"I want to fight the war in the enemy's backyard, not ours," Graham said.

Graham has been a confidant of Trump's, but it's unclear how much Trump will listen to him on Syria. Still, Graham said he's generally pleased with Trump's foreign policy initiatives.

"All I ask him to do is to make sure we don't fumble the ball inside the 10-yard line, sit down with the generals," Graham said.

In Tehran, Iran and Syria signed Sunday a long-term strategic and economic agreement as the war winds down in Syria where Iran and Russia were the main backers of Assad’s government since the crisis began nearly eight years ago.

Syria's SANA news agency quoted Syrian Minister of Economy and Foreign Trade Mohammed Samer al-Khalil, who signed the agreement, as saying that the deal includes "full cooperation on the financial and banking levels." He added that this would allow Iranian companies to be present through investments in Syria.

The Syrian government has gained control of large parts of the country with the help of Iran and Russia and some Arab countries, including the oil-rich United Arab Emirates, have reopened their embassies in Damascus.

The Syrian government estimates reconstruction of the war-torn country will cost some $200 billion dollars and last 15 years.

Al-Khalil said that "priority in the reconstruction of Syria will be given to Iranian public and private companies," according to SANA's report.

SANA also reported that a technical delegation form the UAE visited Damascus International Airport to evaluate it in preparation for resumption of flights between the Gulf nation and Syria.

Associated Press writers Bassem Mroue in Beirut and Kevin Freking in Washington contributed to this report.