Iran prisoner release shakes up US debate

US President Barack Obama, standing with Vice President Joe Biden, delivers remarks in the East Room of the White House in Washington, DC on July 14, 2015, after an Iran nuclear deal was reached (AFP Photo/Andrew Harnik) (Pool/AFP/File)

Washington (AFP) - Iran's surprise release of four Americans put US Republicans critical of President Barack Obama's engagement with Tehran on the back foot Saturday.

Republican White House hopefuls who have lambasted Obama for engaging with Iran saw their attack blunted by the a swap deal that saw the release of Washington Post reporter Jason Rezaian and three others.

A fifth American, identified as Matthew Trevitick, was also to be released but as part of a different process.

Obama opponents have been deeply critical of his nuclear deal with Iran, which will see sanctions eased against a regime that still sponsors violent militant groups across the Middle East.

Republican attacks on Obama's policy of engagement had intensified this week as 10 American sailors were detained in the Gulf by Iran’s hardline Revolutionary Guard Navy, but not before being paraded in front of the cameras.

The White House and its allies were quick to point to the sailors’ quick release and were further buoyed by the release of five more Americans, which they said was evidence that diplomacy is working.

"For all the bluster and bombast fashionable in some quarters, today's events underscore how important and--under-appreciated--diplomacy is," said David Axelrod, a long-time Obama advisor.

Democratic presidential hopeful Martin O’Malley sent his own "memo" to Republican candidates. "Diplomacy beats carpet bombing," he said.

Republicans responded to the prisoner release with a mixture of caution and criticism.

"We don't know the details of the deal that is bringing them home. It may well be that there are some very problematic aspects to this deal," said Texas Senator Ted Cruz.

Florida Senator Marco Rubio said he was happy for the families of the captives, but accused the Obama administration of "incentivising" the detention of Americans by agreeing to a swap of seven Iranians imprisoned in the United States.

"It tells us all we need to know about the Iranian regime, that they take people hostage in order to gain concessions and the fact that they can get away with it with this administration," he said.

"I think this created an incentive for more governments to do this around the world.”

Frontrunner Donald Trump, who has long portrayed himself as a master negotiator, questioned whether it was a good deal.

"I'm happy they are coming back but I will tell you, it's a disgrace that they have been there for so long," said Trump.