paid $400m to Iran as part of a failed arms deal as they also lifted n

The US secretly flew $400 million stashed inside wooden pallets out to Iran as four Americans were released from Tehran - but the Obama administration insists it was not a ransom payment.

The pallets, which were stuffed with euros, Swiss francs and other foreign currencies, arrived in Tehran on January 17. That same day, four US citizens were released in exchange for seven Iranians held in the United States.

Officials denied any link between the payment and the prisoner exchange, saying the deal was part of a $1.7 billion settlement to resolve a failed 1979 arms deal, the Wall Street Journal reports.

Bur critics claim that the clandestine multi-million dollar payment was part of the hostage negotiations.

They also point to the fact that President Barack Obama failed to make any mention of the $400 million when he announced the prisoner exchange.

Scroll down for video

Critics have accused the Obama administration of paying a $1.7 billion 'ransom' for the hostages (President Obama and Vice President Joe Biden speaking last year about the Iran nuclear deal)

'With the nuclear deal done, prisoners released, the time was right to resolve this dispute as well,' President Barack Obama said on January 17.

Iranians had demanded the return of the $400 million which was paid to the Pentagon by Iran, shortly before the fall of Iran's last monarch, Shah Mohammad Reza Pahlavi, to purchase US fighter jets.

Officials admit that Iranian negotiators had demanded cash over the exchange to show they had won something from the US in negotiations.

But they insist that negotiations on the prisoner exchange, and the failed arms deal settlement were completely separate.

'As we've made clear, the negotiations over the settlement of an outstanding claim…were completely separate from the discussions about returning our American citizens home,' State Department spokesman John Kirby said.

US officials admit they realized the United States was going to lose its case over the arms deal in The Hague, where Iran was seeking more than $10 billion compensation.

Republican Sen. Tom Cotton, Arkansas, accused the Obama administration of paying a $1.7 billion 'ransom' for the hostages.

Trump responded to the report on Wednesday, blaming his rival Hillary Clinton - claiming she started the talks when she was secretary of state between 2009 and 2013

President Obama sent $400 million to Iran last January as four American prisoners were released from Tehran, US officials have revealed (Pictured is Washington Post reporter Jason Rezaian who had been held by Iran since July 2014)

Former U.S. Marine Amir Hekmati (left) and pastor Saeed Abedini (right) were among the four men released in Janaury

They have also expressed concerns the money could be used to fund terrorist groups such as Lebanese militia Hezbollah or it could be funding Assad's regime in Syria.

Local press reports also quoted Iranian defense officials describing the money as a ransom payment.

The Obama administration has refused to say how the $1.7 billion was paid.

But officials say the $400 million was paid in foreign currency, because transactions with Iran in US dollars is illegal in the United States.

It was such a large amount of cash that the US was forced to transfer the money into the central banks of the Switzerland and the Netherlands.

Once the dollars were converted to foreign currency, it was stacked in the wooden pallets and sent off to Iran.

The cargo plane carrying the money arrived in Tehran’s Mehrabad airport on January 17 - the same day the American detainees were released.

Negotiations for their release began back in 2014 with Switzerland’s foreign minister hosting the discussions at the InterContinental Hotel, Geneva, on behalf of the US which has not had diplomatic interests in Iran since closing its Tehran embassy following the 1979 hostage crisis.

Sanctions against Iran were lifted in January in a deal credited for bringing about the prisoner exchange (Iranian President Hassan Rouhani in January)

US Secretary of State John Kerry, hailed the new deal with Iran which successfully resolved a decades-old failed arms deal, is pictured talking with Iranian Foreign Minister Mohammad Javad Zarif

Talks began picking up pace in July 2015 when Iran agreed to restrain its nuclear program in exchange for the international sanctions against it being lifted.

US and European officials told the Wall Street Journal the negotiations began by focusing on a straight forward prisoner swap but grew to envelop compensation for the failed arms deal.

Eventually, Obama agreed to pay the $400 million and the four Americans were released from a Tehran prison last January.

Rezaian, a Washington Post reporter, had been held by Iran since July 2014, when he was arrested and convicted of supposed espionage offences.

U.S. officials confirmed that 39-year-old Rezaian, former U.S. Marine Amir Hekmati, pastor Saeed Abedini and a fourth man, all of whom have U.S.-Iranian dual nationality, had been freed.

Pastor Saeed Abedni, was jailed for three years on charges of undermining national security, and former US Marine Amir Hekmati, who is serving 10 years for supposedly cooperating with hostile governments, were also released. A fourth man, Nosratollah Khosavi-Roodsari, was released but chose to stay in Iran. Little is known about his background or his arrest.

The three Americans returning home flew via Switzerland before being taken to a base in Germany for medical treatment.

Meanwhile a fifth American - student Matthew Trevithick - was also freed, but this was unrelated to the prisoner swap, which saw seven Iranian prisoners released or pardoned by the United States.

A fifth American, student Matthew Trevithick (right), was also freed in January but this was unrelated to the prisoner swap

A US official told the Washington Post at the time that 'Iranians wanted a goodwill gesture' in return, leading to the release of seven Iranian prisoners.

Iranian state media named the men as Nader Modanlo, Bahram Mechanic, Khosrow Afghahi, Arash Ghahraman, Tooraj Faridi, Nima Golestaneh and Ali Saboonchi.

All of the men were joint U.S.-Iranian citizens with the exception of Golestaneh who studied in Vermont but never gained citizenship.

Golestaneh was serving a jail sentence after admitting trying to steal millions of dollars of U.S. company software for the Iranian government.

Modanlo, Ghahreman and Saboonchi were all serving sentences for illegally supplying Iran with technology in violation of the U.S. trade bans.

Mechanic, Faridi and Afghahi, all of whom were arrested as part of the same alleged conspiracy, were also accused of violating the trade bans but were awaiting trial before being released.

Rezaian, who was born in California, was convicted in closed proceedings last year after being charged with espionage. The Post and the U.S. government denied the accusations, as did Rezaian.

He was sentenced to an undisclosed amount of time in jail.

The reporter, who was the Post's Tehran correspondent was originally detained with his wife in July 2014, but she was released on bail in October that year.

Former Marine Amir Hekmati, originally from Flint, Michigan, was arrested in Iran on espionage charges in 2011.

In January, US officials announced they were lifting 30 years of sanctions against Iran

His family said he has lost significant weight in jail and has trouble breathing, raising fears he could have contracted tuberculosis.

Mr Hekmati went to Iran to visit family and spend time with his ailing grandmother.

After his arrest, his family says they were told to keep the matter quiet. He was sentenced to death in 2012. After a higher court ordered a retrial, he was sentenced in 2014 to 10 years in prison.

Pastor Saeed Abedini, from Boise, Idaho, was detained in 2012 for compromising national security after he was found to be preaching Christianity.

He was sentenced in 2013 to eight years in prison. President Barack Obama met his wife and children in 2015.

There are claims he was beaten in Iranian prison.

Republican presidential candidate Donald Trump criticized the deal at the time as not being fair to America.

According to The Guardian , Trump told a rally in New Hampshire: 'They're getting seven people, so essentially they get $150 billion plus seven, and we get four.'

The announcement of the prisoners' release came - and was likely directly linked to - the imminent lifting of sanctions imposed on the Islamic republic.

'Implementation day' of the nuclear deal agreed last year marks the biggest re-entry of a former pariah state onto the global economic stage since the end of the Cold War.

It also marks a turning point in the hostility between Iran and the United States that has shaped the Middle East since 1979.

Under the deal, Iran has agreed to stop enriching uranium, which world powers feared could be used to make a nuclear weapon.

Once sanctions are lifted, Iran plans to swiftly ramp up its exports of oil. Global companies that have been barred from doing business there are likely to set up shop almost immediately.

John Kerry hailed the lifting of sanctions following a nuclear deal, saying: 'The entire world is safer because the threat of the nuclear weapon has been reduced'

Iran's transport minister said the country had already agreed a deal with Airbus to buy 114 planes after the sanctions are removed.

Secretary of State John Kerry had praised the prisoner release as an improvement in relations between the two countries.

Kerry said Iran had met its obligations to the U.N. atomic watchdog and that the sanctions have now been lifted as per promises made in the landmark nuclear agreement.

In a statement, Kerry said: 'Iran has undertaken significant steps that many, and I do mean many, people doubted would ever come to pass.

'And that should be recognized, even though the full measure of this achievement can only be realized by assuring continued full compliance in the coming years.

'Today marks the moment that the Iran nuclear agreement transitions from an ambitious set of promises on paper to measurable action in progress.

'Today, as a result of the actions taken since last July, the United States, our friends and allies in the Middle East, and the entire world are safer because the threat of the nuclear weapon has been reduced.'

Since the prisoner exchange, Iran's Revolutionary Guard has arrested three more Iranian-Americans.