Lee Jae-myung, a progressive who leads the Democratic Party of Korea, is the new president of South Korea.

His victory Tuesday in a ballot to replace Yoon Suk Yeol, impeached after trying to launch a coup last year, caps an extraordinary life that took him from slums outside Seoul to his nation’s highest office.

He will need all that experience to address the daunting array of challenges — most immediately, uniting a bitterly divided public — that he inherits. Lee moderated his positions during the campaign in an attempt to make that job easier. That was enough to win a mandate in this week’s ballot but far more will be required if South Korea is to navigate the difficult political and economic shoals that it faces.