SEOUL, South Korea — A former prime minister of South Korea was convicted on Friday of receiving illegal political funds from a businessman who later committed suicide.

Lee Wan-koo, the former prime minister, was sentenced to eight months in prison, but the Seoul District Court suspended the sentence, allowing him to remain free. If he commits another crime within two years, he will be forced to serve the term, the court said.

Mr. Lee, 65, a lawmaker affiliated with President Park Geun-hye’s governing party, has maintained his innocence and said he would appeal. Mr. Lee had served little more than two months as prime minister under Ms. Park when the scandal forced him to resign last April.

In July, he was indicted on a charge of receiving a shopping bag containing 30 million won, or about $24,900 at current exchange rates, in an illegal campaign donation from the businessman, Sung Wan-jong, in 2013.