SEOUL, South Korea -- A court ruled Friday that the billionaire heir to the Samsung empire provided bribes in an effort to gain the support of then-president Park Geun-hye.

Lee Jae-yong, 49, was also convicted of embezzlement, hiding assets overseas, concealing profit from criminal acts and perjury.

The case fed public anger leading to Park's removal from office.

Get Breaking News Delivered to Your Inbox

Prosecutors wanted a 12-year prison term for Lee, but he was sentenced to five. He'd been detained since February.

Lee's lawyers said they would appeal.

Lee, princeling of South Korea's richest family and its biggest company, was accused of offering $38 million in bribes to four entities controlled by a friend of Park in exchange for government help with a merger that strengthened Lee's control over Samsung at a crucial time.

Then-South Korean President Park Geun-hye releasing statement of apology to public during a news conference at Presidential Blue House in Seoul, South Korea, on October 25, 2016 Baek Seung-ryeol/Yonhap via REUTERS

Park, who was embroiled in a tumultuous series of scandals, was ousted from office in March and is being tried separately. Her friend, Choi Soon-sil, also is on trial.

Lee denied the allegations against him.

Park was also in court Friday as part of her ongoing trial.