Republicans on Capitol Hill and the campaign trail expressed optimism and happiness Saturday about Iran releasing five U.S. citizens but continued raising concerns about the nuclear deal with Tehran that is expected completed this weekend and connected to the accord.

“Hopeful this long ordeal for our four Americans held hostage in Iran finally appears to be over,” tweeted GOP presidential candidate and Texas Sen. Ted Cruz. “Praise God! Surely bad parts of Obama's latest deal, but prayers of thanksgiving that Pastor Saeed is coming home.”

The four Americans were released in an apparent prisoner-swap purportedly for as many as a dozen Iranians being detained in the United States. A fifth American was also released, but he was not part of first exchange.

House Speaker Paul Ryan, R-Wis., said through a spokeswoman that he was “glad” about the Americans being released but is awaiting details on the “ransom paid for their freedom.”

The first four Americans released were Washington Post reporter Jason Rezaian, former U.S. Marine Amir Hekmati, pastor Saeed Abedini and Nosratollah Khosravi, whose name had not been previously made public.

They are being flown to Switzerland aboard a Swiss aircraft. And upon their arrival, they will be taken to a U.S. military hospital in Landstuhl, Germany, for medical treatment, U.S. officials said.

The fifth American is being identified as student Matthew Trevithnick, and is already on his way home, the officials said. They spoke about the prisoner exchange on condition of anonymity because they were not authorized to discuss it publicly.

Secretary of State John Kerry is set to announce Saturday that Iran has complied with all of the requirement on curtailing it efforts to build a nuclear weapon, in exchange for getting back $100 billion in frozen assets.

Republicans and others critics of the deal say the United States and the five other world powers let Tehran off too easy, in part by failing to demand stricter inspections of nuclear-related facilities.

President Obama and others in his administration have argued that reaching a perfect deal would be nearly impossible and that this deal is better than no deal with a rouge nation that poses a regional and global nuclear threat.

"I am very pleased that four American citizens, who were illegally imprisoned by Iran in flagrant violation of longstanding international human rights norms, have finally been released,” said GOP presidential candidate Ben Carson. "However, … president Obama's nuclear agreement with Iran is fatally flawed and gravely jeopardizes the national security interests of the American people, our ally Israel and other peaceful nations in the Middle East and around the world.”

He also said releasing the roughly $100 billion to Iran and allow the country to “continue exporting terrorism around the world.”

The Associated Press contributed to this report.