"It's great to be back in Flint, my hometown," he told reporters moments after stepping out of a plane at Bishop International Airport. "I love this city. I love its people. They've been so good to me and my family and we're very grateful."
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.
"It's been a very long road," Hekmati said. "Unfortunately, many people have traveled this road with me."
Along with Hekmati, Washington Post journalist Jason Rezaian, Christian pastor Saeed Abedini and Nosratollah Khosravi-Roodsari were released Sunday
as part of a prisoner swap. Matthew Trevithick, a student who was recently detained, was released, too, but not as part of the prisoner swap.
Hekmati thanked President Barack Obama, lawmakers and "everyday Americans" for their support.
"Despite all the difficulties ... I'm standing here healthy, tall and with my head held high," he said.
Abedini had an emotional reunion with loved ones Thursday afternoon in Asheville, North Carolina. As he embraced several people at the airport, Abedini offered a prayer of thanksgiving.
In a Facebook post, Naghmeh Abedini said her husband "will spend a few days with his parents and then the kids and I will join him on Monday."
"Please pray for us as we will be spending weeks or possibly months healing as a family and going through counseling," she wrote.
Abedini will spend time at the Billy Graham Training Center at The Cove in Asheville, according to a spokesperson with the Billy Graham Evangelistic Association.
Abedini, an Iran native and convert to Christianity, 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.
On Tuesday, outside the Landstuhl Regional Medical Center, a U.S. military hospital in Germany, Hekmati told reporters his freedom was "like being born again."
Hekmati described the pressures of his more than four years as a prisoner as "inhumane and unjust." He did not elaborate but said he will disclose details "about the experience and what happened" later.
"I did not relax until we were out of Iranian airspace," Hekmati said.
He said he had reached a point "where I had just sort of accepted the fact that I was going to be spending 10 years in prison."
News of his eventual release was sudden and unexpected, Hekmati told reporters. The long wait to finally leave Iran was agonizing.
"It was very nerve-wracking," he said. "I was very worried that maybe the Iranian side was going to make new demands in the last minute or that the deal wasn't going to work out."
Confusion about departure
At first, Hekmati said, the prisoners were told that they would be leaving in two hours, but their departure on a private plane didn't occur until almost 2½ days later.
"As soon as we got out of Iranian airspace," he said, "Champagne bottles were popped."
The Americans' flight from Iran was delayed because of confusion over the whereabouts of Rezaian's wife and mother, whom U.S. officials had insisted be part of the release deal.
On Monday, U.S. Secretary of State John Kerry said in an interview with CNN's "New Day" that Iran's foreign minister and other officials understood that the terms of the agreement included the two and ensured it happened.
Iran detained Rezaian in 2014, eventually charging him with espionage and other crimes, according to The Washington Post. He was the newspaper's Tehran bureau chief.
Not much is known about Khosravi-Roodsari.
Trevithick arrived Sunday night in Boston, according to his stepmother, Susan Trevithick.
"Matthew Trevithick is happy to be back in Massachusetts after his ordeal in Tehran's Evin Prison," his family said. "He is doing well, spending time with his family and catching up on Boston sports."
Rezaian, Hekmati and Abedini arrived Sunday at Ramstein Air Base in Germany, and underwent medical checkups at Landstuhl Regional Medical Center.
Hekmati's family released a photo Monday showing him with two sisters and a brother-in-law, along with U.S. Rep. Dan Kildee, D-Michigan. They spent about 15 minutes together, according to a brief statement from the family.
Khosravi-Roodsari decided not to leave Iran, senior White House officials said. "It's his free determination" whether he wants to stay in Iran, one official said. "We don't make that judgment."
Torture allegation, health problems
The American Center for Law and Justice, a Washington-based group dedicated to protecting religious and constitutional freedoms, reported that Abedini was tortured during his imprisonment and beaten by fellow prisoners in June. He suffered injuries to his face at the time, the center reported.
Hekmati suffered from health problems, including weight loss and breathing difficulties, according to his family.
In exchange for the American prisoners' freedom, Washington pardoned or commuted the sentences of an Iranian and six people of dual U.S.-Iranian citizenship in what President Barack Obama called a "one-time gesture."
The men allegedly had been involved in exporting products and services to Iran in violation of trade sanctions against the country. They were accused of exporting goods ranging from electronic components and satellite services to marine navigation and military equipment to Iran.
Khosrow Afghahi, Tooraj Faridi, Bahram Mechanic and Nima Golestaneh were pardoned. Nader Modanlo, Arash Ghahreman and Ali Saboonchi had their sentences commuted, the U.S. Justice Department said.
The United States also agreed to drop charges against 14 other Iranians whose extradition seemed unlikely, a U.S. official said.
On Monday, Iranian Foreign Ministry spokesman Hossein Jaberi Ansari said 28 Iranians "were freed or were relieved of judicial restrictions" under the agreement. He did not name them.