A South Korean court has decided to release President Yoon Suk Yeol from prison, potentially providing the impeached leader with a rare win as he awaits a separate verdict on whether he should be ousted from office for good over his brief imposition of martial law.

The Seoul Central District Court accepted Yoon’s complaint against his arrest, it said Friday in a text message. Yoon will be released unless prosecutors challenge the decision, Yoon’s lawyer, Seok Dong-hyeon, said in a separate message.

The decision comes as the Constitutional Court mulls whether to remove Yoon from the presidency or reinstate him. The final impeachment hearing took place on Feb. 25 and a decision is expected within weeks if not days. A snap election will be held within 60 days should the court confirm Yoon’s removal.