MOSCOW (AP) — A Moscow court has rejected an attempt to prolong the jail sentence of opposition leader Alexei Navalny, clearing the way for him to be released on Friday morning.

Navalny, the Kremlin’s most prominent foe, was sentenced last month to 30 days for calling on people to take part in an unauthorized protest.

While in jail, he was taken to a hospital with a severe facial rash that doctors said was an allergic reaction. Some supporters suspected he was poisoned. He spent 18 ½ hours in the hospital.

The head of the jail where he is serving his sentence asked a court Thursday to delay his release by those 18 ½ hours, but the court rejected the move.