Seoul: South Korea's impeached President Yoon Suk Yeol was released from detention on Saturday following a court order.
Television footage showed Yoon waving and bowing to supporters after leaving the detention center in Seoul where he had been held since January 15 on charges of leading an insurrection.
"I bow my head in gratitude to the people of this nation," Yoon said in a statement that was released through his lawyers.
He also thanked the court "for their courage and determination in correcting the illegality."
Yoon's release came after Seoul Central District Court on Friday ruled in favor of his request to be freed from prison.
Yoon was arrested and charged by prosecutors in January over his December 3 decision to declare martial law, a move that plunged the country into political turmoil.
South Korea's opposition-led parliament subsequently voted to impeach Yoon in mid-December, leading to his suspension from office.
Following his impeachment, the 64-year-old resisted arrest for two weeks at his presidential compound in central Seoul.
Yoon has since defended the short-lived imposition of martial law as a "proclamation that the nation was facing an existential crisis."
His release does not affect ongoing criminal and impeachment trials. Yoon remains suspended from his duties.
The Constitutional Court has been deliberating whether to formally dismiss Yoon — the first South Korean president to be arrested while in office — or reinstate him.
Insurrection is one of the few criminal charges from which a South Korean president does not enjoy immunity.
The crime is punishable by life imprisonment or death. However, South Korea has not executed anyone in decades.