Updated

Former Prime Minister Ehud Olmert left prison Sunday after winning early release from a parole board, capping an ignominious chapter of Israeli history that transformed the once-powerful leader into the first premier ever to be placed behind bars.

Olmert, who served 16 months for his role in a corruption scandal, appeared gaunt and pale as he walked out of the Maasiyahu prison in central Israel. Wearing a tight black T-shirt, he was quickly whisked away by security, but later was seen mingling with shoppers in an upscale shopping mall in Tel Aviv.

"We are very happy, a great burden has been lifted and a great sorrow and pain has ended," Eti Livni, a friend of Olmert's, told Army Radio.

Olmert, 71, was serving a 27-month sentence when the national parole board decided last week to release him early for good behavior. Olmert had recently been hospitalized after complaining of chest pains.

Under the terms of his release, Olmert must perform volunteer work for several months, report to police twice a month and not give interviews to the media or leave the country, said prison service spokesman Assaf Librati. Olmert will reportedly volunteer at a food bank and for a group that provides medical aid to needy families.

A few hours after his release, a somber-looking Olmert, accompanied by a bodyguard, was seen walking around a shopping mall in Tel Aviv.

A public relations company representing the mall released photos of the former premier in a clothing store. The statement said people had greeted him and wished him well, and in one picture, a smiling Olmert is seen chatting with a store employee.

Just a few years ago, Olmert was hobnobbing with the world's rich and famous and leading his country in an intense round of peace talks with the Palestinians.

But in 2008, he was forced to resign to fight off a burgeoning corruption case, leading to the election of the current prime minister, Benjamin Netanyahu, the following year. Peace efforts have been all but frozen ever since.

Olmert was a longtime fixture in Israel's hawkish right wing when he began taking a dramatically more conciliatory line toward the Palestinians more than a decade ago. He played a leading role in Israel's withdrawal from the Gaza Strip in 2005 and joined then-Prime Minister Ariel Sharon in breaking away from the hard-line Likud Party and forming a new centrist party called Kadima later that year.

Olmert became prime minister in January 2006 after Sharon suffered a debilitating stroke and led Kadima to victory in parliamentary elections, promising additional peace moves with the Palestinians.

Olmert presided over a turbulent three-year term. Shortly after his election, Palestinian militants from Gaza crossed the border and captured an Israeli soldier. Weeks later, Hezbollah militants in Lebanon burst across Israel's northern border and captured two more soldiers, setting off a monthlong war.

A weakened Olmert led his government to a U.S.-hosted peace conference in Annapolis, Maryland, in November 2007 — launching more than a year of ambitious, but ultimately unsuccessful U.S.-brokered talks.

A gifted orator known for his sharp tongue, Olmert broke a series of taboos while in office — warning that Israel could become like apartheid South Africa if it continued its occupation of the Palestinians and expressing readiness to relinquish parts of Jerusalem under a peace deal.

Olmert has said he made unprecedented concessions to the Palestinians — including a near-total withdrawal from the West Bank and an offer to place Jerusalem's Old City under international control — and was close to reaching an agreement at the time of his resignation.

Olmert, who over the years developed a reputation for loving the good life, was convicted in 2014 in a wide-ranging case that accused him of accepting bribes to promote a real-estate project in Jerusalem and obstructing justice. The charges pertained to a period when he was mayor of Jerusalem and trade minister before he became premier in 2006.

Olmert repeatedly denied any wrongdoing, and on the day he reported to prison, he released a video proclaiming his innocence.

Israel has sent other senior officials to prison, including Moshe Katsav, who held the largely ceremonial post of president before serving five years in prison for rape and other sex crimes. But Olmert is the only former prime minister to go to prison.

Olmert was rushed to the hospital with chest pains last month, but doctors ruled out a heart attack. A few days before that, Israel's Justice Ministry asked the police to investigate whether Olmert committed a "criminal offense" while behind bars.

It said a book Olmert is writing touches on "sensitive security issues" and that his lawyer was caught leaving the prison with a chapter on "secret operations" not approved by the censor for publication. Police searched the publishing house of the Yediot Ahronot newspaper over the incident.

Justice Minister Ayelet Shaked welcomed Olmert's release, telling Army Radio he deserved to have his sentence reduced and that "all in all his behavior in prison was very good."