South Korea’s impeached president Yoon Suk Yeol left a detention centre in Seoul on Saturday after prosecutors decided not to appeal a court decision to cancel his arrest warrant.
Mr Yoon remains suspended from his duties and under insurrection charges over his short-lived martial law imposition on 3 December. The criminal case is separate from his impeachment trial, in which the Constitutional Court is expected to decide in coming days whether to reinstate him or remove him from office.
TV footage on Saturday showed Mr Yoon coming out of prison. Mr Yoon waved his hand and deeply bowed to his supporters after he came out of a detention centre in Seoul.
The Seoul Central District Court cancelled Mr Yoon's arrest warrant on Friday, citing the timing of his indictment and "questions about the legality" of the investigation process.
Mr Yoon, the first South Korean president to be arrested while in office, has been in custody since 15 January.
On Saturday, some 38,000 of his supporters rallied in Seoul, while 1,500 people demonstrated against him, Yonhap news agency reported, citing unofficial police estimates.

The president was arrested and indicted in January for rebellion, in connection with his martial law decree. The move sparked chaos in Seoul before it was voted down by lawmakers and rescinded in a matter of hours.
Mr Yoon has claimed he was acting to root out "anti-state" elements and that he never intended to fully impose emergency military rule.
Mr Yoon's lawyers had argued the warrant issued on 19 January was invalid because the request filed by prosecutors was procedurally flawed.
"South Korea's rule of law is still alive," Mr Yoon's legal counsel said, shortly after Seoul Central District Court made the ruling on Friday.
The president's office welcomed the court’s decision, saying it hopes Mr Yoon “will return to work soon”.
The court said it accepted the president's request to be released from jail because the legal period of his formal arrest expired before he was indicted. The bench noted that there were "questions about the legality" of the investigation process that involved two separate agencies.
“To ensure procedural clarity and eliminate any doubts regarding the legality of the investigative process, it would be appropriate to issue a decision to cancel the detention,” the court said.
The 64-year-old president evaded arrests for weeks by remaining in his residential compound, which was protected by loyal members of the Presidential Security Service.
The country's first martial law decree in nearly 40 years ended just after six hours when the National Assembly voted to withdraw it. Members of the assembly jumped over fences and broke through lines of armed soldiers who were preventing lawmakers from entering the building.
Mr Yoon is also facing an impeachment trial at the Constitutional Court to determine whether to remove him from office permanently or reinstate his presidential powers. If the court upholds Mr Yoon's impeachment, he will be thrown out of office and a national election will be held to choose his successor within two months.
During his impeachment trial, the president apologised to the people of the country for not being able to serve them and causing "confusion and inconvenience" with his martial law bid.
Mr Yoon said if he was allowed to serve, he would make constitutional amendments to change the current presidential system and push for political reforms.
"If a constitutional amendment and political reform are pursued correctly, I believe the separated and divided people will unite in the process," he added. He also suggested stepping down before his single five-year term ends in 2027 to promote "political reform".
South Korea is currently led by finance minister Choi Sang Mok, who became the country's second acting president in two weeks after Mr Yoon's impeachment.
The first acting president, Han Duck-soo, was impeached amid disagreements with the opposition on appointing justices to the Constitutional Court.
Kim Jong Un inspects North Korea’s first ‘nuclear-powered submarine’
South Korea raises toll of people injured in fighter jet misfire to 29
Moment South Korean fighter jet mistakenly bombs village during training drill
15 injured as South Korean fighter jet drops bombs on homes during joint US drills
North Korea escapees describe horrors of Covid-era repression
North Korean tourist village shuts down after just three weeks