Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

SEOUL, South Korea — Samsung heir Lee Jae-yong was freed Monday after a South Korean appeals court gave him a 2 ½-year suspended jail sentence for corruption in connection with a scandal that toppled the country's president.

The ruling clears the way for the Samsung vice chairman to resume his role at the helm of the industrial giant founded by his grandfather after a year in prison.

Lee Jae-yong leaves a detention center in Uiwang, South Korea, on Monday. Ahn Young-joon / AP file

In a surprise decision, the Seoul High Court softened the original ruling against Lee, rejecting most of the bribery charges leveled against Lee by prosecutors who sought a 12-year prison term.

Lee, 49, is a billionaire and heir to one of the world's biggest corporate empires. He had been detained since last February.

The Morning Rundown Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

"The past year was a precious time for personal reflection," Lee told reporters after being released. Lee's first stop from the prison was a Samsung hospital where his father has been hospitalized since he suffered a heart attack in 2014.

Lee was charged with offering $38 million in bribes to former President Park Geun-hye and her confidant Choi Soon-sil, embezzling Samsung funds, hiding assets overseas, concealing proceeds from criminal activities and perjury.

The appeals court said Lee was unable to reject the then-president's request to financially support her confidante and was coerced into making the payments. The court still found Lee guilty of giving 3.6 billion won ($3.3 million) in bribes for equestrian training of Choi's daughter and of embezzling the money from Samsung funds.

Lee's lawyer, Lee Injae told reporters outside the court that while he respects the court's courage and wisdom, Lee still plans to appeal his conviction. Prosecutors also were expected to appeal the court's ruling, making it almost certain the case will go to the the Supreme Court, the final court of appeal in South Korea.

Ousted South Korean President Park Geun-hye after a court hearing in Seoul on March 30. Song Kyung-Seok / Pool via EPA

Lee was given a five-year prison term in August on bribery and other charges linked to a political scandal that brought down Park.

The more lenient ruling surprised many who were expecting a tough stance from the appeals court and many South Koreans took to social media and online news portals to express anger at the ruling and the judge who issued the verdict.

"Republic of Samsung" and the name of the judge who handed down Monday's verdict were among the top trending words on Twitter.

The earlier ruling against Lee was seen as a departure from the previous court cases that had been criticized for being too lenient toward white-collar crime and toward executives of chaebol, the big conglomerates that helped South Korea's rapid industrialization.

Before the final hearing at the appeals court Lee paid back 8 billion won ($7.3 million) to Samsung Electronics. The lower court had said Lee embezzled that amount from Samsung to bribe Choi.

Despite Lee's pleading not guilty, few South Koreans had expected him to walk out of prison.