AP Photo/Ebrahim Noroozi, File

FILE - In this Saturday, Oct. 17, file photo, Iranian Foreign Minister Mohammad Javad Zarif listens to a question during a press conference with his German counterpart Frank-Walter Steinmeier in Tehran, Iran. Iran says it will attend the upcoming international talks over Syria's future this week in Vienna. State TV quoted Foreign Ministry spokeswoman, Marzieh Afkham, on Oct. 28, as saying Foreign Minister Mohammad Javad Zarif will attend the talks.

TEHRAN, Iran (AP) — Iran said Wednesday, Oct. 28, it will attend the international talks on Syria’s future later this week in Vienna, following an invitation from the Russian envoy that would mark Tehran’s first appearance at such a gathering.

The invitation to the talks came after the United States declared itself ready to engage long-time foe Iran if it might help halt Syria’s four-year civil war.

Iran is a key ally of Syrian President Bashar Assad and has provided his government with military and political backing for years. Tehran admits that its Revolutionary Guard officers are on the ground in Syria in an advisory role, but denies the presence of any combat troops in the country.

Iranian state TV quoted Foreign Ministry spokeswoman, Marzieh Afkham, as saying Wednesday that Foreign Minister Mohammad Javad Zarif will attend the talks. It didn’t provide details but said Zarif discussed the Syrian crisis with his Russian counterpart, Sergey Lavrov, on Tuesday night and Wednesday morning.

The TV also said Deputy Foreign Ministers Hossein Amir Abdollahian, Abbas Araghchi and Majid Takht-e-Ravanchi would accompany Zarif on the trip.

“We believe the solution for Syria is a political solution. Americans and foreign players in Syria have no choice but to accept the realities in Syria,” Abdollahian told state TV Wednesday. “Assad … has the necessary readiness for talks with insurgents who are committed to a political path.”

Iran’s semi-official ISNA news agency also quoted the foreign ministry spokeswoman as saying the Islamic Republic would attend. Earlier in the day, she said Tehran was considering whether to join the gathering in Vienna.

One round of talks have already been held in Vienna between Russia and the United States, Turkey and Saudi Arabia, all backers of Syria’s opposition. In addition to pro-Assad Iran, pro-rebel Arab states have been invited to the new round, including Jordan and the United Arab Emirates, as well as diplomats from Britain, France and Germany. The foreign minister of Egypt — which has taken an anti-terrorism stance that has made it less critical of Assad — also said he would attend.

Syrian opposition activists said inviting Iran will only prolong the conflict because Tehran would reflect the Syrian government’s position.

“The international community should not accept that the problem be the solution,” said Bebars al-Talawy, a Homs-based activist who reports on the fighting in his hometown in central Syria. He said Iran was the source of the “knot” in the Middle East and “will only complicate the situation and increase the bloodshed.”

“We are surprised (Iran is invited). We consider the Iranian position that of the Syrian regime, and they should not be on the negotiating table,” said Jamil Saleh, commander of the CIA-backed Tajammu Alezzah, a rebel group operating in the central province of Hama.

Iran’s attendance could be a game-changer. Iran has backed Assad’s government throughout the conflict and the Syrian opposition may balk at Iran’s inclusion in any discussions on what a post-Assad Syria should look like. Tehran’s attendance would also mean that traditional Iran-Saudi regional rivalries could surface at the negotiating table.

But all previous international efforts have failed to stop the war, now in its fifth year with over 250,000 dead and millions displaced from the conflict.

Washington is trying to unite all sides with influence in the Arab country around a common vision of a peaceful, secular and pluralistic Syria governed with the consent of its people.

Iran’s supreme leader, Ayatollah Ali Khamenei, had ruled out new negotiations with Washington after the United States and five other nations clinched a long-term nuclear agreement in July. But Iran clearly has a stake in Syria’s future, as Assad’s government has helped the Iranians exert dominance over nearby Lebanon and threaten Israel through their proxy, Hezbollah.

Amid all the talking, Syria’s fighting goes on.

Since last month, Russia has launched hundreds of airstrikes targeting what it says are the Islamic State and other terrorist groups. The Obama administration, NATO and others say most of the bombs are landing on moderate rebel militias, some backed by the CIA.

Meanwhile, violence continues to rage between Syria’s rebel groups and the Islamic State, and in the Kurdish region in northern Syria, even drawing in Turkey.

Associated Press Writers Bradley Klapper and Matthew Lee in Washington and Sarah El Deeb in Beirut contributed to this report.