A fifth man -- described as a recently detained student named Matthew Trevithick -- was separately released, U.S. officials said.
The announcement comes on a day when the International Atomic Energy Agency, the United Nations' nuclear watchdog, announced Iran is in compliance with a July deal to restrict its nuclear program. As a result, at least some international economic sanctions against Iran were lifted.
As part of the deal, Iran agreed to release of Rezaian, Hekmati, Abedini and a fourth detainee identified by U.S. officials as Nosratollah Khosravi-Roodsari in exchange for clemency for seven Iranians indicted or imprisoned in the United States for sanctions violations, the officials confirmed.
Six of the seven are dual citizens.
The deal comes after more than a year of secret negotiations, the officials said. The nuclear agreement "accelerated" the prisoner swap, U.S. Secretary of State John Kerry said.
The secret talks were led by Brett McGurk, the U.S. special envoy tapped by President Barack Obama to coordinate the global fight against the ISIS terrorist group, senior U.S. administration officials said.
The United States also agreed to drop charges against 14 other Iranians whose extradition to the United States seemed unlikely, a U.S. official said on background.
Robert Levinson's fate unknown
The agreement also calls for Iranian officials to "continue cooperating with the United States to determine the whereabouts of Robert Levinson," a U.S. official said on background. Levinson is the former FBI agent and CIA contractor who went missing in Iran in 2007.
Iran has denied holding him.
"We are happy for the other families," Levinson's family said in a statement. "But once again, Bob Levinson has been left behind. We are devastated."
Trevithick's release was not part of the prisoner swap, but U.S. officials did "indicate to Foreign Minister [Javad] Zarif that it'd be important for them to try to resolve some of the other cases of Americans detained in the context of this" deal," a senior administration official told CNN.
Trevithick has left Iran, administration officials said in a Saturday evening conference call. The four other Americans had not yet departed, the officials said.
Americans held in separate cases
Rezaian was detained by Iran in 2014 and eventually charged with espionage and other crimes, according to the Washington Post. He was the newspaper's Tehran bureau chief.
The newspaper and the United States have called the charges "absurd." Supporters say he has been denied proper legal representation.
"We couldn't be happier to hear the news that Jason Rezaian has been released from Evin Prison," Washington Post spokeswoman Kris Coriatti said in a statement. "Once we receive more details and can confirm Jason has safely left Iran, we will have more to share."
Rezaian's brother Ali said
he had no immediate confirmation of the news.
Hekmati was detained in 2011, weeks after arriving in Iran to visit his grandmother, according to his family's website. The former Marine infantryman and Arabic and Persian linguist was accused of espionage and other charges in 2012.
He appeared on Iranian television and said he was working for the CIA in a confession her mother and the U.S. State Department has said was forced and fabricated.
He was later sentenced to death.
The punishment was later overturned, but Hekmati was later convicted of "cooperating with hostile governments" and sentenced to 10 years in prison, according to a website set up by his supporters.
During his imprisonment, he has suffered from health problems, including weight loss and breathing difficulties, according to his family.
His family released a statement thanking supporters for standing with the family since his arrest.
"There are still many unknowns. At this point, we are hoping and praying for Amir's long-awaited return," the statement read.
Abedini, an Iran native and convert to Christinanity, was arrested in 2012 and convicted the next year on charges of attempting to undermine the Iranian government. He had been sentenced to eight years in prison.
His arrest came three years after he had been arrested by Iranian authorities and later released after agreeing to stop organizing churches in homes. His 2012 arrest came during a trip to help build a state-run secular orphanage.
The American Center for Law and Justice, a Washington-based group dedicated to protecting religious and constitutional freedoms, reported that Abedini has endured torture during his imprisonment and was beaten by fellow prisoners in June. He suffered injuries to his face during that incident, the center reported.
"We're delighted this day has finally arrived," ACLJ Chief Counsel Jay Sekulow said in a statement. "Pastor Saeed should never been imprisoned in the first place."
Abedini's wife, Naghmeh Abedini, said in the statement that the release was "an answer to prayer."
Not much is known about Khosravi-Roodsari.
U.S. offers clemency
The United States is pardoning or commuting the sentence of an Iranian and six dual citizens as part of the deal.
U.S. federal officials said they will not comment on the names of anyone who is part of the agreement until after the four Americans are in U.S. custody.
The attorney for one of the seven told CNN his client was pardoned along with two others indicted at the same time. But he said their release awaits the Americans' departure from Iran.
"I've seen the pardon," said Joel Androphy, the lawyer for Bahram Mechanich.
Androphy said the pardon covered Mechanich and Tooraj Faridi, both of Houston, and Khosro Afghahi of Los Angeles. The Justice Department accused the three of being "members of an Iranian procurement network operating in the United States," according to a news release at the time of the April 2015 indictment.
Specifically, they were accused of shipping electronic components to Iran in violation of the trade sanctions, Faridi's attorney, Kent Schaffer, told CNN affiliate KPRC in Houston.
Schaffer said his client has been out on bond since the indictment while the other two men have been held at the federal detention center in Houston awaiting trial.
Faridi was "overjoyed" at news of the pardon and plans to stay in the United States because it's his home, Schaffer said. Mechanich, who was "elated" by the pardon, plans eventually return to Iran, where he has a business, Androphy said.
The pardons have been in the works for "a while," Schaffer said, declining to offer details.
A source familiar with the case of a fourth man identified him as Ali Saboonchi. The Maryland man was convicted in August 2014 of a plot to export industrial products and services to Iran, a news release from the U.S. Attorney's office said at the time.
Saboonchi faced a maximum sentence of 20 years in prison when he was convicted, but the sentence he was ultimately given was not clear Saturday.
The state-run Islamic Republic News Agency (IRNA) named the other three men as Nader Madanloo, Arash Ghahreman and Nima Golestaneh.
Madanloo, of Maryland, is serving an eight-year sentence for conspiring to illegally provide satellite services to Iran, according to the U.S. Justice Department.
Ghahreman, of Staten Island, New York, was found guilty in April 2015 of a scheme to export marine navigation equipment and military electronic equipment to Iran, according to the Justice Department.
Golestaneh pleaded guilty last month to charges of wire fraud and fraud in connection with computers, according to the U.S. District Court for the District of Vermont. He faced up to 25 years in prison for both counts, but the length of his sentence wasn't immediately clear.