In a rare split, Sens. John McCain and Lindsey Graham do not agree on whether the U.S. should work with Iran to beat back an insurgency in neighboring Iraq.

Both Republicans are urging President Obama to take swift military action in Iraq to fight the al Qaeda-inspired Islamic State of Iraq and Syria, fearing the country is combining with uncontrolled areas of Syria to become an hotbed for terrorist activity and a staging ground for attacks on the U.S.

If the U.S. fails to get involved forcefully enough, both fear that Shia Iran will step into the vacuum to bolster its Iraqi Prime Minister Nouri al-Maliki, also a Shiite, which they argue will only further inflame sectarian tensions and inspire more Sunnis to join the ISIS fight.

When it gets to the question of the U.S. coordinating with Iran to combat ISIS in Iraq, however, the two are breaking ranks.

McCain on Monday issued a statement calling the notion that Iran could be a U.S. partner in managing the deteriorating security situation in Iraq “the height of folly.”

“The reality is, U.S. and Iranian interests and goals do not align in Iraq, and greater Iranian intervention would only make the situation dramatically worse,” he said in a lengthy statement.

“It would inflame sectarian tensions, strengthen the Islamic State of Iraq and Syria (ISIS), drive more Sunnis into ISIS’s ranks, empower the most radical Shia militants, deepen the Iraqi government's dependence on Iran, alienate U.S. allies and partners in the region, and set back the prospects of national reconciliation.”

Over the weekend, Graham endorsed the idea of the U.S. working with Iran in a frenemies scenario, where the enemy of your enemy becomes your ally – albeit in a limited capacity.

“Why did we deal with Stalin?” he told CNN's “State of the Union” Sunday. “Because he was not as bad as Hitler. The Iranians can provide some assets to make sure Baghdad doesn't fall. We need to coordinate the Iranians, and the Turks need to get into the game and get the Sunni Arabs back into the game, form a new government without Maliki.”

He followed up the comments by stressing that he doesn't want Iran to dominate Iraq, to allow them to save Baghdad without our help so they cement Maliki's Shia-dominated leadership and there's no chance for a more inclusive government.

McCain and Graham recently also split on the impact of the swap of Sgt. Bowe Bergdahl for five Taliban leaders should have on closing Guantanamo Bay.

Both were incensed about the release of five hardcore Taliban leaders to Qatar and warned that they would go back to the fight to disrupt the government in Afghanistan and plot attacks against Americans.

But Graham took it one step further, warning of a GOP impeachment push if Obama tries to release any other prisoners from Guantanamo Bay.

Graham, a prominent member of the Senate Armed Services Committee and a military lawyer, has long supported the idea of shuttering the island prison and at one point a few years ago even served as Obama's point man in Congress for the efforts.

After the Bergdahl deal, he set all bets were off.

“Now is a time for a time-out,” he continued. “Terrorist groups are getting much more lethal, they are growing. We don't need to take the starters who have been on the injured reserve list and put them back in the game.”

McCain, who also supports closing the Guantanamo Bay prison as long as it means moving a number of hardcore terrorism suspects to the U.S. for indefinite detention, said anyone trying to tie the issue to the Bergdahl exchange was improperly “convoluting” the issues.

"I never wanted to release these people – I wanted them transferred – so this really has no connection to whether Gitmo stays open or closed," he said.

Former Sen. Joe Lieberman, the former Democrat turned Independent from Connecticut, joined McCain's and Graham's joint stands on foreign policy so frequently that the trio became known as the three amigos.

With Lieberman's departure from the Senate, Sen. Kelly Ayotte, R-N.H., has stepped into a similar role. Over the last few weeks, she joined broad statements with McCain and Graham on both Bergdahl and Iraq but hasn't sided with one or the other when the two have diverged on the ramifications of the Bergdah's swap on transferring more Gitmo detainees or so far on whether the U.S. should work with Iran in trying to stabilize Iraq.