GOP presidential candidate Ted Cruz on Sunday criticized the prisoner swap this weekend between the U.S. and Iran, saying the Obama administration is “negotiating with terrorists” and suggested the deal is part of the president’s overall weak foreign policy.

“Our enemies are laughing at us,” the Texas senator said on “Fox News Sunday.”

The deal announced Saturday returns four Americans in exchange for the release of seven Iranians, whom Cruz said were detained for trying to help Iran with its nuclear program.

U.S. officials said the Iranians were either sentenced or awaiting trial in the United States but were not associated with terrorism.

They also said the seven were offered clemency and were not associated with violent crimes.

“They tried to kill us,” Cruz said Sunday.

The four Americans are Washington Post reporter Jason Rezaian, Pastor Saeed Abedini, former U.S. Marine Amir Hekmati and Nosratollah Khosravi.

U.S. officials announced Saturday that a fifth American, student Matthew Trevithick, was recently freed but that his release was unrelated to the swap.

The United States also removed any Interpol red notices and dismissed any charges against 14 Iranians previously sought but not in U.S. custody, as part of the deal.

They were released hours before Secretary of State John Kerry announced that Iran had fulfilled its duties toward curtailing its pursuit of a nuclear weapon, in exchange for the lifting of crippling economic sanctions and the return of $100 billion in frozen assets.

“Praise God, Americans are coming home,” said Cruz, who is trailing front-running GOP presidential candidate Donald Trump but leading in Iowa, according to most polls. “But this deal is really problematic.”

Cruz also said the swap sets a “dangerous precedent,” despite the White House saying it was a “one-time” situation created by the nuclear deal.