Iran's move to shore up the Iraqi government has prompted a difficult question: how do you intervene on behalf of your sectarian allies without inflaming a sectarian war?
In recent days, Iran has stepped forward with aid, overseeing secret surveillance drone missions over Iraq and sending transport plans with military equipment and supplies to Baghdad. And back in Tehran, hundreds of Iranians rallied in the streets earlier this week in support of their Shiite neighbors.
Iranian-American journalist Hooman Majd, author of "The Ministry of Guidance Invites You to Not Stay: An American Family in Iran," says Iran has carefully avoided framing the situation as a sectarian divide.
"It's very important for the Iranians for [the crisis] not to become a sectarian issue because Iran needs the so-called 'Arab street' to be sympathetic to Iran, and not be hostile to it as it has been in recent years," Majd says.
Ultimately, Iran wants to avoid turmoil in Iraq and protect its territory from groups like ISIS. But that doesn't mean automatic support for the policies of Nouri al-Maliki, Iraq's Shiite prime minister. He has so far refused to create a new, more inclusive government, and Majd thinks Iran doesn't agree.
"It is a purely vengeful sectarian position that Maliki has taken, and I think Iran is not comfortable with that," he says. "I think they've made it clear to Maliki, although he is still an ally of Iran."
Iran is working to aid Iraq and maintain a good relationship with Maliki, without putting its own population at risk.
"Iran has a Sunni population of its own, it has a Kurdish population of its own. It has Arabs in the south of Iran," says Majd. "There is no interest for Iran to encourage a sectarian issue here."
There are also the persistent tensions between Arab Iraqi Shiites and Persian Iranian Shiites.
"We do have to remember that when Iran fought an eight-year war with Iraq, the vast majority of the soldiers fighting Iran were Shiite," Majd explains. "So there is no illusion among Iranians or among Iraqis that the Shiites of Iraq and Shiites of Iran, just because they are from the same sect, are bosom buddies."
But the sectarian issue is difficult to ignore, especially for Shiites in the Iraqi government who spent their exile years in Iran.
"This is a country where the iron fist of Saddam Hussein came down most hard on Shiites, as we know from history," Majd says.
Iraq is also home to the holiest shrines for Shiites, and Majd says that Iran will never allow "Shiite holy sites to fall to ISIS or any other group that has proclaimed they will destroy them."
But though Iran could become a neutral military protector of Shiite holy sites, Majd says it could only happen in the unlikely event that Iraq splinters.
"I don't think Iran wants to be seen in that role, at least certainly not yet," he adds. "Because again, I think it points to a sectarian and an ethnic issue that the Iranians don't really want to get involved in."