A South Korean intelligence official

A South Korean intelligence official has been found dead in an apparent suicide amid a growing political scandal over a covert hacking programme used by the country's spy agency, police said Sunday.

The 45-year-old from the National Intelligence Service (NIS) was discovered dead in his car Saturday on a mountain road in Yongin, about 40 kilometres (25 miles) south of Seoul.

Police said the man, identified only by his family name Lim, apparently took his own life after leaving a handwritten will in his car giving details of how the NIS had used a controversial hacking programme.

Government and NIS officials have admitted purchasing the programme from an Italian company but say it was only used to boost Seoul's cyber warfare capabilities against Pyongyang and not for any domestic monitoring.

Opposition legislators, however, argued the NIS has used the programme to spy on South Koreans.

Lee Chul-Woo, a ruling party legislator who heads a parliamentary intelligence committee, said Lim had purchased and run the hacking programme, which allows users to track smartphones and computers by installing spyware.

In a copy of his will released by police, Lim insisted the NIS had not spied on South Koreans and apologised for deleting files relating to the programme.

"There was no monitoring of people at home," he said.

"I deleted information that created misunderstandings about our counter-terrorism and covert operations on North Korea... It was a mistake on my part. But there is nothing to be worried about over any of my actions."

The NIS had a notorious reputation in the decades of authoritarian rule before South Korea embraced democracy in the 1980s and its modern incarnation has faced a series of scandals, including election meddling.

Last week the Supreme Court ordered a lower court to review its conviction of former spy chief Won Sei-Hoon, who was jailed for three years on charges of illegally engaging in political acts.

The charges related to an online smear campaign by NIS agents against the opposition party candidate whom the current president, Park Geun-Hye, defeated in the 2012 poll by a narrow margin.

Won, 64, initially received a suspended sentence, but an appeals court in February handed down a three-year custodial sentence.

The Supreme Court declined to rule on Won's guilt, but ordered the High Court to re-examine what it described as deficient evidence regarding crucial emails and tweets.