Having lost to Park Geun-hye in South Korea’s 2012 presidential election, Moon Jae-in has become the chief beneficiary of the abuse-of-power scandal that engulfed his erstwhile opponent.

Moon’s victory in the race to the presidential Blue House in Seoul could herald an era of rapprochement with North Korea, and an unlikely meeting of minds with Donald Trump over Pyongyang’s nuclear and ballistic missile programmes.

The 64-year-old left-leaning liberal positioned himself as the only candidate qualified to reunite the country after the bitter divisions that opened up over Park’s allegedly corrupt relationship with her longtime friend and confidante Choi Soon-sil.

While Park sat in detention awaiting trial on charges that could lead to her being sentenced to life in prison, Moon tapped into the country’s appetite for change, opening up a double-digit lead over his closest rival, the centrist Ahn Cheol-soo.

In a month of rising tensions on the Korean peninsula over Pyongyang’s nuclear and ballistic missile programmes, Moon has criticised the hard line pursued by Park and her predecessor, Lee Myung-bak, pointing out that a decade of conservative rule had done nothing to arrest the regime’s nuclear programme.

Significantly, North Korea indicated that Moon was its favoured candidate, with state media recently calling on South Korean voters to “punish the puppet group of conservatives” associated with Park.

Eager to court the older conservative voters who consigned him to a narrow defeat five years ago, Moon has shown himself to be a pragmatist. He has stopped short of overtly criticising Trump’s aggressive tone during the most recent crisis on the Korean peninsula, and has declared that he and the US president are “on the same page” in regarding the Obama administration’s policy of “strategic patience” as a failure.

What were the issues in the South Korean election? Despite tensions running high with the North, the campaign focused largely on the economy and the bribery and abuse of power scandal that brought down Moon Jae-in's predecessor, Park Geun-hye. The Park scandal played into frustration over widening inequality in wealth and opportunities. South Korea enjoyed rapid growth from the 1970s-90s, but the rate slowed as the economy matured, and unemployment among under-30s now stands at a record 10%. Voter anger was often directed at chaebols, the massive, family-run conglomerates that dominate the economy and are seen by many as exemplifying a cosy relationship between business and government.

Working-level “talks about talks” with North Korea are a possibility, according to Moon’s foreign policy adviser, but, like Trump, he has so far ruled out a summit with Kim Jong-un unless the regime commits to abandoning its nuclear ambitions.

Although Moon was critical of Washington’s “undemocratic” rush to deploy its missile defence system in a South Korean village late last month, he has said only that he would “review” its future if elected president.

He also supports the reopening of the Kaesong industrial complex, a joint North-South project that was regarded as a symbol of cross-border cooperation until it was “temporarily” closed in early 2016.

Given the speculation that North Korea could be preparing to conduct its sixth nuclear test in just over a decade – a move that the White House has hinted could invite military retaliation – it is easy to forget that Tuesday’s vote, called seven months early, was initially prompted by issues closer to home.

Moon has promised to reform South Korea’s family-run conglomerates – or chaebol – whose shady ties to senior politicians were exposed by the Park scandal, and to address pressing domestic problems such as rising inequality and youth unemployment.

The eldest son of a refugee from North Korea, Moon can claim to have played a role in significant moments in South Korea’s modern history.

As a young conscript in South Korea’s special forces, he took part in a mission following the infamous axe murder incident inside the demilitarised zone in 1976.

After a career as a human rights lawyer, he served as chief of staff to the then president Roh Moo-hyun, whose pursuit of his predecessor Kim Dae-jung’s “sunshine policy” of engagement with Pyongyang Moon hopes to emulate – this time as South Korea’s leader.