Iran freed four American prisoners on Saturday, including Washington Post correspondent Jason Rezaian, U.S. and Iranian officials said, as diplomats assembled in Vienna to finalize the implementation of last summer’s landmark nuclear deal between Iran and six world powers.

“In line with the Supreme National Security Council approvals and general expedience of the system, four dual-nationality Iranian prisoners have been freed today under exchange mechanism,” Tehran prosecutor Abbas Jafari-Dolatabadi said.

U.S. officials confirmed Saturday that they secured the release of four Iranian-Americans as part of a prisoner swap.

“We think this is a very good day. We’re very pleased these Americans will be coming home,” a senior U.S. official said. “We believe they were unjustly detained. We are better able to resolve these things when we have diplomatic channels.”

The U.S. officials said the Iranian wife of the Washington Post’s Mr. Rezaian, Yeganeh Salehi, also would be allowed to leave the country.