Authorities in South Korea say an intelligence official who apparently committed suicide left behind a note denying the government spied on its citizens.

The National Intelligence Service agent, identified by Yonhap news agency as a man in his mid-40s named Lim, was found dead in his car on a mountain road in the city of Yongin, located south of Seoul.

Police released a handwritten note found in the car in which the agent insisted that the NIS never used a computer program designed to intercept cellphone and online conversations of ordinary South Koreans.

The NIS has been under fire since revealing to lawmakers that it purchased the program from an Italian software company in 2012, due to its history of domestic spying, especially during South Korea's era of authoritarian rule. The agency says it used the program only to boost its cyberwarfare capabilities against North Korea.

The NIS has also been engulfed in a number of scandals in recent years, especially involving elections. South Korea's Supreme Court last week ordered a new trial for a former NIS director who was convicted on charges of directing a smear campaign against President Park Geun-hye's opponent in her successful 2012 election.