South Korean voters have overwhelmingly chosen the liberal candidate Moon Jae-in as their next president, an exit poll suggests.
It put Mr Moon on 41.4%, with his nearest challenger, the conservative Hong Joon-Pyo, on 23.3%.
Mr Jae-in favours greater dialogue with North Korea, in a change with current South Korean policy.
The early election was called after a corruption scandal led to the impeachment of the former president.
Park Geun-hye is accused of allowing a close friend to extort money from companies. She denies all wrongdoing.
A former member of South Korea’s Special Forces turned human rights lawyer, president elect, of the Democratic Party of Korea, unsuccessfully ran against Ms Park in 2012 elections.
He positioned himself as the man who can move the country on from the scandals of Ms Park’s era.
“I feel that not only my party and myself but also the people have been more desperate for a change of government,” he said while casting his vote earlier on Tuesday.