SEOUL, South Korea >> South Korea’s top court ended months of political turmoil when it unanimously decided to remove the impeached president Yoon Suk Yeol on Friday, clearing the way for the country to elect a new leader.

But the political crisis that Yoon triggered with his misjudged declaration of martial law in December — and his ensuing impeachment by the National Assembly — exposed a deep fissure in South Korea’s polarized politics. For months, protesters for and against Yoon have taken over the streets in Seoul. After months of political limbo, the ruling by the Constitutional Court on Friday finally gave South Korea a sense of direction that it has desperately needed.

Yoon, who had defiantly held onto his job despite his impeachment, is a former president now. In the coming days, he must vacate his presidential residence, and the government will schedule a national election because his successor must be chosen within 60 days. “This is a victory for South Korean democracy,” said Sung Deuk Hahm, dean of the Graduate School of Political Studies at Kyonggi University, remembering how South Koreans had sacrificed their lives to oppose military rule in the past. “It has taken time, but this time, the rule of law eventually prevailed without blood-shedding or serious violence.”

Yoon’s institution of martial law, which lasted six hours until the National Assembly voted to kill it, was the first attempt by a South Korean leader to use the military as a political tool since the country began democratizing in the 1980s.

In a ruling millions of South Koreans, including schoolchildren, watched on live television Friday, the Constitutional Court found Yoon guilty of “violating the constitutional order” and “betraying the people’s trust” when he sent troops to seize the legislature during his short-lived martial law.