FILE PHOTO: Robert Fico speaks during the news conference at the Chancellery in Berlin, Germany, April 3, 2017. REUTERS/Hannibal Hanschke/File Photo

BRATISLAVA (Reuters) - The head of Slovakia’s main ruling party gave up a bid to lead the country’s top court on Tuesday and warned a coalition partner against voting with the opposition on appointing judges.

Robert Fico, who has a law degree, sought the chairmanship of the Constitutional Court after being ousted as prime minister last year by anti-corruption protests sparked by the murder of an investigative journalist.

None of the remaining 37 candidates to be judges at the court won majority backing in parliament and a new vote will take place on Thursday, still without Fico, the head of the social-democratic Smer party.

He withdrew his bid after a junior partner in the three-party governing coalition, Most-Hid, which represents Slovakia’s ethnic Hungarian minority, refused to back him.

Fico threatened Most-Hid with “serious consequences for the functioning of the cabinet” if its parliamentarians vote with the opposition.

Under Slovak law, parliament picks two candidates for each court position and the president, Andrej Kiska, a long-term rival of Fico, chooses one from each pair.

The Constitutional Court, which rules on whether legislation and legal rulings are in line with the constitution, could become temporarily dysfunctional if the state fails to replace the nine out of 13 judges whose terms end on Feb. 16.

President Kiska will step down in June, having said he would not run in an election in March. Fico said he believed only a newly elected president would have the legitimacy to make appointments to the court.