South Korean President Moon Jae-in has ordered an special independent investigation into an allegation that the top military intelligence unit may have proposed an armed crackdown on peaceful candlelight vigils last year protesting the rule of Moon's predecessor, the presidential Blue House said Tuesday.

Last week, a ruling Democratic Party lawmaker disclosed what he said was a document showing that the South Korean Army's Defense Security Command (DSC) had considered declaring martial law if rallies either opposing or supporting then-President Park Geun-hye grew violent after a Constitutional Court ruling on her impeachment over a corruption scandal.

The plan, which was never implemented, was apparently based on a prediction that the Constitutional Court would overturn Park's impeachment, the left-leaning South Korean Hankyoreh daily reported last week.

The Constitutional Court eventually ruled to impeach Park, sparking smaller protests denouncing the verdict while larger, more popular rallies celebrated it.

"President Moon Jae-in has ordered Defense Minister Song Young-moo to form an independent investigation team to swiftly and fairly investigate the allegation that the Defense Security Command created a document that proposed considering declaring martial law," the South's Yonhap news agency quoted the Blue House as saying in a statement.

The special investigation team will consist of military prosecutors who are unrelated to the army or the DSC. It will function as an independent counsel, not subject to direction from any military officials, including the defense minister himself, Yonhap reported.

Scores of South Koreans took to the streets for the massive candlelight vigils for six months from October 2016 to protest the influence-peddling scandal that had embroiled Park, the country's first female president and the daughter of dictator Park Chung-hee.

In April, Park, 66, was sentenced to 24 years in prison after she was found guilty of abuse of power and coercion.