TEHRAN, Iran — Even as the U.S. and Iran pursue negotiations on Tehran’s nuclear program, they find themselves on the same side of a range of regional issues surrounding an insurgency raging across the Middle East.

While the two governments quietly continue to pursue their often conflicting interests, they are being drawn together by their mutual opposition to an international movement of young Sunni fighters, who with their pickup trucks and Kalashnikovs are raising the black flag of al-Qaida along sectarian fault lines in Syria, Lebanon, Iraq, Afghanistan and Yemen.

The U.S., reluctant to intervene in bloody, inconclusive conflicts, is seeing its regional influence decline, while Iraq, which cost the U.S. $1 trillion and more than 4,000 lives, is growing increasingly unstable.

At the same time, Shiite-dominated Iran, the magnetic pole for the Shiite minority in the region, has its own reasons to be nervous, with the ragtag army of Sunni militants threatening Syria and Iraq, both important allies, and the U.S. drawing down its troops in Afghanistan.

On Monday, Iran offered to join the U.S. in sending military aid to the Shiite government in Baghdad, which is embroiled in street-to-street fighting with radical Sunni militants in Anbar province, a Sunni stronghold. On Sunday, U.S. Secretary of State John Kerry said he could envision an Iranian role in the coming peace conference on Syria, even though the meeting is supposed to plan for a Syria after the resignation of President Bashar Assad, an important Iranian ally.

To some, the Iranian moves reflect the clever pragmatism of Iran’s new president, Hassan Rouhani, and his foreign minister, Mohammad Javad Zarif, aimed at building their country into a regional power. To others critical of the potential rapprochement, the moves are window dressing aimed at lulling the West into complacency while Tehran pursues nuclear weapons and supports its own jihadis throughout the region.

Yet, even Iranians outside the reformist camp see the shared interests as undeniable. “It is clear we are increasingly reaching common ground with the Americans,” said one of them, Aziz Shahmohammadi, a former adviser to Iran’s Supreme National Security Council. “No country should have an eternal enemy, neither we nor the United States.”

With Iran as an island of stability in a region plagued by violent protests, sectarian clashes and suicide bombers, there are not that many options left for Washington, experts here say.

“We face the same enemy, and the enemy of my enemy is my friend,” said Mashallah Shamsolvaezin, a prominent Iranian reformist journalist who closely follows the Arab world. He recalled how Iranian intelligence operatives gave reliable information to American special forces troops battling Iran’s enemy, the Afghan Taliban, in 2001.

While the Obama administration acknowledges that Iran has the potential to be an influential player on regional issues from Afghanistan to Syria, senior officials have said they are keeping their focus tightly on the nuclear negotiations. Cooperation on any other issues, they said, hinged largely on coming to terms on Iran’s nuclear program.

The administration has concluded that Rouhani and Zarif have been empowered to negotiate on the nuclear program, but officials said it remained unclear whether their policy-making authority extended to regional issues like Syria. There, the Islamic Revolutionary Guards Corps holds vast influence through its Quds Force, and it is supplying weapons to Hezbollah in an effort to prop up Assad’s government.

The thaw in relations extends back almost a year, with the two countries making overtures long thought impossible, deeply angering Washington’s closest regional allies, Saudi Arabia and Israel.

As early as last spring, a series of secret talks in Oman and Geneva laid the groundwork for re-establishing relations, cut 34 years ago after Iranian students took U.S. diplomats hostage in revolutionary Tehran.

In September came the agreement — credited to President Vladimir Putin of Russia but fully backed and partly engineered by Iran — to remove Syria’s chemical weapons. Not long afterward, President Barack Obama and Rouhani held a historic phone conversation, and in late November the U.S. and other world powers struck a temporary nuclear agreement with Iran, the first in 10 years.

Iran has been presenting itself as the voice of reason, pointing at the extremely graphic videos of beheadings and other executions produced by some of the insurgent groups in Syria, while Rouhani wished a happy New Year to all Christians on his Twitter account.

“Now extremists are once again threatening our security, and as in 2001, both countries will cooperate with each other in Iraq, and potentially elsewhere too,” Shamsolvaezin said. “This is the beginning of regional cooperation.”

The thaw presents dangers to Obama and Rouhani, who will remain vulnerable to criticism from conservatives in both countries. Kerry’s invitation on Sunday for Iran to join “on the sidelines” of the Geneva conference was angrily rejected by Iranian hard-liners.

Critics of U.S. policy say that the Obama administration is strengthening Iran at the expense of traditional allies, particularly Saudi Arabia and Israel. They say that Iran has not cut back on its support of its regional allies, like Hezbollah, the militant Shiite group in Lebanon, and Assad, and is deeply involved with Iraq’s Shiite government.

As you comment, please be respectful of other commenters and other viewpoints. Our goal with article comments is to provide a space for civil, informative and constructive conversations. We reserve the right to remove any comment we deem to be defamatory, rude, insulting to others, hateful, off-topic or reckless to the community. See our full terms of use here.

A marker on the Hillcrest Golf Course proclaims the Hillcrest Knoll to be Ramsey County's highest hilltop, though folks in Arden Hills and Shoreview might dispute it. Soon, the 1920s-era golf course may have another claim to fame -- housing, and lots of it. At Larpenteur Avenue and McKnight Road on the city's Greater East Side, Hillcrest represents 112 acres...

The owners of the St. Paul Saints are seeking an exemption from having to pay its players Minnesota's minimum wage. The Saints say without the exemption, the baseball team runs into a problem with a league rule limiting club payrolls. “We’re in a league that has a salary cap," Saints Executive Vice President and General Manager Derek Sharrer told state...

Construction of Interstate 94 through St. Paul in the 1950s and 1960s upended the Rondo neighborhood, forever separating what's now Summit-University with a deep highway trench. Maybe not forever. Organizers behind the ReConnectRondo initiative have kicked off a week's worth of community panels, a dinner, reception, tours and outreach opportunities with land use and real estate experts from the Urban...