Image copyright AP Image caption Ban Ki-moon leaves a press conference announcing he will not run

Former UN Secretary General Ban Ki-moon has ruled himself out of the running for the South Korean presidency.

Mr Ban, considered the conservative frontrunner, blamed political slander and "various fake news" stories against him for the surprise move.

His decision is seen as a boost for liberal candidate Moon Jae-in.

South Korea is due to hold elections by the end of the year, but they could take place earlier if President Park Geun-hye is formally removed.

Ms Park was impeached in December amid a long-running corruption scandal.

Slump in approval rating

Mr Ban gave a brief news conference on Wednesday in Seoul in which he said he wanted to use his 10 years of experience as UN chief to achieve national unity, but said he had been subjected to "malign slander akin to character assassination".

"With all kinds of fake news, my intention for political change was nowhere to be seen and all that was left was grave scars to my family and myself, and to the honour of the UN where I spent the past 10 years," he said.

He said he was "disappointed by old-fashioned, narrow-minded egoistic attitudes by some politicians, and I came to a conclusion that it would be meaningless to work together with them".

Mr Ban had never officially declared he would run for the presidency but was at one time the perceived frontrunner.

But his approval ratings fell sharply as he faced criticism about his political competence, and he struggled to secure the significant party support.

He apologised in January after losing his temper at a press conference and calling reporters "jerks", and has denied allegations he took bribes from a businessman at the centre of a corruption scandal.

Mr Moon called Mr Ban's decision "unexpected" and said he would be willing to seek his advice on international affairs.

The Constitutional Court is currently hearing the impeachment case against Ms Park, who denies wrongdoing. She has been relieved of official duties.

If the impeachment is upheld, presidential elections will be held within two months.