South Korea's presidential election next month is turning into a two-horse race between two former liberal allies, after Ahn Cheol-soo overtook Moon Jae-in in the latest polls.

Ahn led Moon 36.8 percent to 32.7 percent in a Yonhap News/KBS survey taken over the weekend and released Sunday. Another survey by the Chosun Ilbo newspaper showed Ahn was favored by 34.4 percent of respondents, compared with 32.2 percent for Moon. The Yonhap/KBS poll was conducted by Korea Research Center on 2,011 voters and had a margin of error of 2.2 percentage points.

While both results are based on a hypothetical contest involving several candidates in the May 9 election, the surveys also showed that Ahn would beat Moon in a two-way contest. The election was triggered by the removal from office of Park Geun-hye amid a graft scandal.

Hong Joon-pyo, of Park's conservative Liberty Korea Party, was a distant third in both polls, failing to get double-figure support.

Conservative voters appear to be gravitating toward Ahn, a technology tycoon-turned-politician of the centrist People's Party, who has been taking a tougher line on North Korea than Moon, the left-leaning nominee of the Democratic Party of Korea.

Ahn has expressed support for the deployment of a U.S. missile-defense system on South Korean soil, while Moon has said he would review its installation even as tensions with North Korea mount.

Moon, 64, a former human rights lawyer, was the runner-up to Park in 2012 elections. Ahn, 55, the millionaire founder of an antivirus software startup, supported Moon in that campaign after dropping out of the race a month before the election.