SEOUL — The drama of South Korean history opens a tumultuous new act with the election of a liberal labor lawyer who has promised both to bring about detente with North Korea and satisfy the demands of restive masses fed up with rightist abuses.

Whether Moon Jae-in will be able to live up to his campaign pledges is about as problematic as Donald Trump keeping his word to “make America great again.” Like Trump, Moon is likely to find taking charge of government and getting people to follow his bidding is more difficult than talking about it.

What takes priority, reconciliation with North Korea or economic hardship at home? And how does President Moon work through the maze of bureaucratic and legislative obstacles, not to mention the shrill protests of those who opposed him?

Yes, he won far more votes than either of the other two major candidates, the conservative Hong Joon-pyo and the centrist Ahn Cheol-Soo. Throw in the votes for all the also-rans, however, and you get a clear majority of the electorate preferring someone other than Moon.

No doubt the issue that transfixed most voters in the past few months has been the scandal of the ousted, jailed Park Geun-hye, whose fall from grace had everything to do with endemic corruption and the cozy bonds between the top layers of government and the chaebol that prop them up. Sure, people care about North Korea too, but you didn’t hear too many demands for a revival of the Sunshine policy of Kim Dae-jung and his successor, Roh Moo-hyun, whom Moon served as chief of staff.

The fact that Moon in that capacity arranged Roh’s visit to see Kim Jong-il in Pyongyang near the end of his presidency in 2007 may have whetted his appetite for another mission to Pyongyang, this time as a supplicant before Kim Jong-un, but the coveted invitation may not be all that easy to get.

We can be pretty sure Kim will first want to see if Moon really is as Sunshine-minded as he might have seemed during his campaign. The litmus test will be whether he loosens the ties that bind the Republic of Korea in tight alliance with the United States. Moon will have to show he’s not America’s man before Kim invites him for a summit.

Moon himself was quoted as saying he would rather go to Pyongyang to see the North Korean leader before going to Washington to call on the American president. He has denied, however, having said anything quite like that. For sure, he’ll be off to the White House not too long after taking over the Blue House.

A Moon-Trump summit, though, does not mean he has to be all that cooperative. Surely he’ll want to see what Trump was talking about when he said South Korea owed the United States $1 billion for the luxury of providing a home for THAAD, the Terminal High Altitude Area Defense counter-missile battery now lurking on a Lotte golf course way south of Seoul.

Will Moon tell Trump, look, we’re not only not going to pay for it, we’re going to ask you to plant it in someone else’s backyard? Or will he be advised to vacillate and avoid an early confrontation with the Americans while risking the wrath of China and, of course, North Korea?

How Moon deals with THAAD will signal the course of his policy toward all the nations surrounding South Korea.

China has been punishing Lotte and other Korean companies by suspending or curtailing their operations, ordering tough customs and safety inspections and stopping hordes of Chinese from coming to Korea on group tours. How long will the Chinese exert this type of pressure while also pressuring North Korea to abandon its nuclear and missile program?

For Moon, North Korea will be more difficult. All Kim Jong-un need do is order a few more missile tests, maybe another nuclear test. Will Moon, in his eagerness for dialogue, argue that sanctions are not working and negotiation are essential? Would he dare offend North Korea by calling for tough measures?

Judging from what he’s said, Moon would still be disposed to concessions — reopening the Gaeseong Industrial Complex, authorizing more visits to North Korea by South Koreans, even resuming the shipments of rice and fertilizer that South Korea bestowed on the North during the decade of Sunshine.

But will his foes let him do all that? Moon, as a minority president, will have to study the art of compromise for the sake of both his policy toward North Korea and his political survival against foes who would like nothing better than to destroy him.