South Korea's presidential vote ended Wednesday with exit polls giving a tiny edge to conservative Park Geun-Hye, daughter of late dictator Park Chung-Hee, in her bid to be the country's first woman leader.
As polling booths closed at 6:00 pm (0900 GMT), a joint exit poll by three TV stations gave Park 50.1 percent of the vote, with 48.9 percent for her liberal rival Moon Jae-In.
The lead of 1.2 percent was inside the margin of error of plus or minus 0.8 percent.
The eventual occupant of the presidential Blue House will have to deal with a belligerent North Korea, a slowing economy and soaring welfare costs in one of the world's most rapidly ageing societies.
At the headquarters of Park's ruling New Frontier Party, party members jumped up and cheered as the exit polls were flashed on TV monitors, but there was no concession or claim of victory by either side.
"We're pleased," said Kwon Young-Se, one of Park's top campaign staff. "Exit polls are still preliminary results, so we will watch with a humble mind until all the votes are counted."
Optimistic Park supporters gathered outside her residence south of Seoul, cheering and waving the national flag.
Despite freezing temperatures that hovered around -10 Celsius (14 Fahrenheit), the election was marked by a high turnout of around 75 percent, compared to 63 percent in the 2007 presidential poll.
"The polls showed we were slightly behind, but we still see a ray of hope because it's within the margin of error," said Jin Sung-Mee, spokeswoman for Moon's main opposition Democratic United Party.
Park, 60, was looking to make history not just as the first female president of a still male-dominated nation, but also the first to be related to a former leader.
Her father Park Chung-Hee remains one of modern Korea's most polarising figures -- admired for dragging the country out of poverty and reviled for his ruthless suppression of dissent during 18 years of military rule.
He was shot dead by his spy chief in 1979. Park's mother had been killed five years earlier by a pro-North Korea gunman aiming for her father.
Moon, the son of North Korean refugees and a former chief of staff to the late left-wing president Roh Moo-Hyun, is a former human rights lawyer who was once jailed for protesting against the Park regime.
After locking in the support of their respective conservative and liberal bases, the two candidates had put much campaign effort into wooing crucial centrist voters, resulting in significant policy overlap.
Both talked of "economic democratisation" -- a campaign buzzword about reducing the social disparities caused by rapid economic growth -- and promised to create new jobs and increase welfare spending.
Moon, 59, was more aggressive than Park in his proposals for reining in the power of the giant family-run conglomerates, or "chaebol", that dominate the economy.
"This is the only way for the people to change the world," Moon said as he voted in the southern city of Busan on Wednesday morning.
"This election is about our livelihoods, economic democracy, welfare and peace on the Korean peninsula," he added.
While both candidates signalled a desire for greater engagement with Pyongyang, Park's approach was far more cautious than Moon's promise to resume aid without preconditions and seek an early summit with North Korean leader Kim Jong-Un.
Although North Korea was not a major campaign issue, its long-range rocket launch last week -- seen by critics as a disguised ballistic missile test -- was a reminder of the unpredictable threat from across the border.
The never-married Park had promised a strong, parental style of leadership that would steer the country through the challenges of global economic troubles.
"Like a mother who dedicates her life to her family, I will become the president who takes care of the lives of each one of you," she said in her last televised news conference on Tuesday.
A female president would be a big change for a country that the World Economic Forum recently ranked 108th out of 135 countries in terms of gender equality -- one place below the United Arab Emirates and just above Kuwait.