SEOUL, South Korea — Lee Jae-yong was suddenly released from prison Monday after serving less than a year of his five-year sentence for bribery, embezzlement and perjury.

A South Korean appeals court concluded that former president Park Geun-hye “browbeat” Lee, the de facto head of the Samsung conglomerate, into promising $38 million in bribes to her and her confidante.

Even Lee himself appeared surprised when the appeals court delivered its ruling. The court upheld four of the five charges against him in a sensational bribery case that has shaken the South Korean establishment to its core, but halved his prison sentence, and then suspended it for four years.

The 49-year-old Samsung scion was free to go, barely six months after being convicted. The other main figures, Park and her secretive confidante, remain in detention while their trials continue.

“The past year has been a valuable time for self-reflection,” Lee told reporters outside the prison. “I will look at things more carefully from now on.”

Riot police held back protesters who yelled that Lee should still be locked up.

Then Lee got into a waiting black car to be whisked off to see his father, who is technically still the chairman of the Samsung behemoth despite being hospitalized and in a coma since suffering a heart attack almost four years ago.

Conveniently, Lee may have a chance to “contribute to society,” as he put it Monday, by the end of this week. He may appear at the opening ceremony of the Pyeongchang Winter Olympics on Friday. Samsung is a major sponsor.

For many South Koreans, this was a sign that, despite the extraordinary events of the last two years, including the impeachment of their president, nothing had fundamentally changed: They still lived in the “Republic of Samsung.”

The term “Republic of Samsung” – a derogatory name underlining the conglomerate’s power in the country – and “Lee Jae-yong probation” began trending on social media after the decision.

“The court has been far more brazen than I expected in letting him off,” said Ahn Jin-gul, secretary general of the People’s Solidarity for Participatory Democracy, a civil group fighting for better corporate governance. “It is questionable how the law can be so generous toward conglomerate owners while so strict toward workers and ordinary people,” he told local reporters.

South Korea transformed its economy from postwar agrarian backwater to a high-tech powerhouse through the “chaebol” conglomerates.

They were supported with government subsidies during the 1960s and 1970s, when Park’s father was president, and the links between the bureaucracy and the corporate sector remain strong to this day.

That often-incestuous relationship was laid bare with the explosive revelations of 2016: The president’s confidante, Choi Soon-sil, had been extracting bribes from the conglomerates while promising favorable treatment for them.

Choi is now on trial for bribery, as is former president Park, who was impeached last March.

Lee was convicted in July for his role in the whole scheme. The Seoul Central District Court found him guilty of paying bribes totaling $6.4 million and embezzling corporate money to fund the bribes, then lying about it.

Lee and other Samsung executives were accused of promising to pay $30 million more in bribes to Choi.

This happened at a time that the Lee family, which maintains control of the Samsung behemoth through a complicated set of cross-shareholdings, was seeking approval for a crucial merger that would enable the family to pass control from Lee’s father to Lee.

Special prosecutors said the Samsung heir arranged the deal during three face-to-face meetings with Park between 2014 and 2016.

But Lee’s team of 28 attorneys said the executive had no knowledge of what his underlings were doing. They appealed the prison sentence. But so did the special prosecutors who had charged him and wanted him sentenced to 12 years behind bars.

The appellate court overturned part of the bribery charges and one charge of illegally transferring assets overseas.

The court said it was impossible to prove that Lee and Park had hatched the deal for which Lee was alleged to have paid a $1.6 million bribe to Choi.

“We find no evidence of collusion between power and business here,” said presiding appeals court judge Cheong Hyung-sik.

He said that Samsung executives had no choice but to “passively comply” with demands made by those with political power.

Lee’s defense team signaled that it would continue trying to have all the convictions overturned.

“We respect the court’s decision in finding the defendants not guilty on the key indictments,” said Lee In-jae of Bae, Kim & Lee, a law firm. Two other Samsung executives were also released Monday.

“We will do our best during the Supreme Court proceedings to clear the charges of which the court did not fully accept our arguments,” he said in a statement forwarded by Samsung.