South Korea’s presidential front-runner has said he is opposed to homosexuality.

Moon Jae-in, who is running as a liberal candidate in the May 9 election, shocked supporters with his statements during the live televised debate.

The former human rights lawyer, who has recently been pegged back in the polls by centrist rival Ahn Cheol-soo, was asked whether he opposed homosexuality, Associated Press has reported.

“I oppose,” Moon said.

When asked again, Moon said: “Of course.”

He also agreed with conservative candidate Hong Joon-pyo that the presence of gay soldiers was weakening the military.

Earlier this month, General Jang Jun-kyu, the army chief of staff, launched a “track-down process” to find and out suspected gay people in the military, according to the Military Human Rights Center for Korea.

The campaign group said this included setting up fake profiles on dating apps to track down soldiers and expose them.

The process is thought to have identified 50 soldiers, 20 of whom now face charges under the country’s military anti-homosexuality laws.

Moon also emphasised his opposition to same-sex marriage during the debate.

Same-sex marriage is not legal in South Korea.

Last year, judges rejected a lawsuit filed by a prominent gay film director and his partner seeking legal status for their same-sex marriage.

Later in the debate, Moon also said he opposed “discrimination based on homosexuality”.

“Moon needs to offer an apology and a correction of his comments made on live television,” said Jung Yol, a gay rights activist.

“What he said was clearly hate speech, and since he is the candidate favoured to win the election, his words can influence how people think.”

After Moon made the comments, LGBT rights protesters showed up with rainbow flags at the candidate’s campaign event in the capital, Seoul.

They shouted: “Apologise for the hate speech!” and asked him: “Are you opposing my own existence?”

13 people were detained following the protests, with some dragged away, according to LGBT rights group Solidarity for LGBT Human Rights of Korea.