TBILISI, Georgia (AP) — Georgian Prime Minister Giorgi Gakharia announced his resignation Thursday following a court ruling that ordered the arrest of a man who leads the ex-Soviet nation's top opposition party.

Gakharia said in a statement he was stepping down because of disagreements within his own team over the decision to arrest Nika Melia, chairman of the United National Movement opposition party.

A Tbilisi court on Wednesday ruled to place Melia, who is accused of organizing “mass violence” during anti-government protests in 2019, in pre-trial detention after he reused to pay an increased bail fee of $12,000. If convicted, Melia faces nine years in prison. He has rejected the charges as politically motivated.

Melia and his supporters from other opposition parties have vowed to resist the arrest, and he denounced the ruling as “unlawful.” According to the Interfax news agency, Melia remained in the Tbilisi headquarters of the United National Movement on Thursday, and police officers were unable to enter the office to apprehend him.

Gakharia said he believes that the detention of the opposition leader could spark tensions and expressed hope that his resignation would help “reduce polarization” in the country.