South Korean President Moon Jae-in has initiated a major overhaul of the Defense Security Command, a military intelligence unit, in the wake of revelations about its politicisation during the impeachment process last year of former president Park Geun-Hye. This scandal has roiled South Korean politics for weeks since the revelation that the DSC had developed a contingency plan to use the military and declare martial law in South Korea should the Park impeachment effort fail.

Moon’s effort to depoliticise the security bureaucracy deepens and reinforces civilian authority over the national security state.

Impeachment in South Korea is complicated. The legislative branch must vote for removal, which it did, and that vote must then be ratified by the judicial branch, which also occurred.

However, there were concerns that if the justices did not ratify impeachment – thereby allowing Park to remain – that the protest movement against her, which at times saw 2% of the national population out on the streets in the winter cold, would not subside.

No one knew quite what might happen in the case of such a “half-impeachment”.

Impeachments are, of course, extremely rare. This is only South Korea’s second experience with it, and the street protest movement against Park was an extraordinary mobilisation over months in the cold, involving huge numbers of people. By the time of her removal, Park’s approval rating was in the single digits. She was nationally loathed for her repeated scandals.

In the months between the legislative and judicial impeachment votes, the country’s politics were frozen. It is simply unclear what might have happened if Park had squeaked through the high court. Would the protestors stay on the streets? Would the country’s government district be paralysed until her term expired? Would frustrated protestors resort to extra-parliamentary action? The concern was that the police might not be able to restore order. Hence the discussion of martial law.

It is not immediately obvious that this should be read as a slow-motion coup, military government, and so on. Most countries have emergency provisions for the use of the military domestically in extreme cases, such as war or natural disaster.

It is also true that the anti-Park street movement might not have dissipated given how intense it was; that some on the left might not have accepted the legitimacy of a half-impeached president, creating the potential for semi-paralysis for months; that North Korea might have seen this as a moment to muck around; and so on. We are still waiting to see just how threatening the DSC response really was.

That said, it looks pretty bad. The protest movement was decidedly non-violent – protestors even picked up their rubbish after marches. No one died or was seriously injured. And protest, of course, is a guaranteed right in South Korea.

The notion that martial law would be necessary against the marchers seems pretty extreme. South Korea also has a history of military government. The military was only finally pushed out of politics in 1987. And the security agencies have a history of intervention in politics, always from the right against the left. Only recently, the South Korea version of the CIA, the National Intelligence Service (NIS), got caught intervening on social media to help the election of Park back in 2012.

So the South Korean left is rightfully very suspicious of anything that smacks of military or intelligence officials intervening. This is wrong, not only for partisan reasons, of course, but also because it is fundamentally undemocratic.

Therein is the silver lining of this latest scandal. Moon’s effort to depoliticise the security bureaucracy – he has moved against NIS too – deepens and reinforces civilian authority over the national security state.

Park’s father was a previous South Korean dictator. She brought back some of those old cronies and an aloof presidential posture. Moon seems quite determined to finally kill that off. He campaigned and has governed as an open, accessible, optimistic persona. Regardless of his politics, this democratic spirit in the executive is healthy for a young democracy such as South Korea. Cleaning up the DSC and NIS is a part of that.