The videos and images of mass killings in Iraq are raising concerns in Tehran as well as in Washington.
Iran shares a 900-mile long border with Iraq and, according New York Times Tehran correspondent Thomas Erdbrink, Iranians are worried the violence might spill over.
"Iraq is considered Iran's back yard," he says, adding that since the removal of Saddam Hussein by US forces, Iranians have been able to find common grounds with the Shia-led government there.
"[In recent years], a lot of business and a lot of travel between Iran and Iraq has developed. The two sites of pilgrimage, Najaf and Karbala in the south of Iraq, are always filled to the brim with Iranians," he says.
A stable Iraq is in Iran and the US' interest.
That's why in recent days both Iranian and US officials have shown interest in a discussion leading to a possible cooperation.
On Monday, for example, US Secretary of State John Kerry speaking on the Iraq issue, said his country "would not rule out anything that would be constructive" with Iran.
Iranian President Hasan Rouhani has also said Iran is willing to work with the Americans.
"Iranian officials have been saying that no one should fear that the border is under Iran's control," Erdbrink says, "but if you look at the map and the positions that ISIS (Islamic State of Syria and Iraq) has been taking, you'll see that some of them are an hour and a half drive away from the Iranian border."
Erdbrink says Iran and the US have cooperated in recent years. He points to the time in 2001-2002, when Iranians supported the Americans when they attacked the Taliban in Afghanistan.
"They provided crucial information and the right for US military planes to fly over Iranian air space," he says.
At the same time, Erdbrink says, this kind of cooperation might help with the nuclear talks that are ongoing between Iran and the West. He says these kinds of interactions between the two countries mean they get a chance to "get to know each other better." Erdbrink compares the effects of any partnership between US and Iran over Iraq to purchasing a carpet in Tehran.
"If you walk into a carpet store here and you find out that the carpet-seller happens to be a fan of a singer that you also love, that might bring the price down," he says. "While a collaboration between Iran and the US might not be successful in one front, but they might be able to strike a bargain on another front," he adds.