For those seeking refuge from war and violence, Hungary has been an unwelcoming place. Prime Minister Viktor Orban has been at the vanguard in casting refugees as an insidious menace, best kept at bay by barbed wire and locked up in detention centers. His government made it a crime to even assist people in the country applying for asylum.

So it was somewhat awkward this week when the former prime minister of Macedonia — Nikola Gruevski, who was supposed to begin a two-year prison sentence on Monday after being convicted of abuse of power — announced on Facebook that he had fled his homeland and was in Budapest seeking asylum.

After more than 24 hours of silence, the Hungarian government confirmed late Wednesday night that Mr. Gruevski was in the country and seeking asylum but provided few other details, including how a convicted politician managed to get into the country considering that both his personal and diplomatic passports had been confiscated.

Mr. Gruevski’s flight stoked outrage in Macedonia, which issued a warrant for his arrest and demanded that he be extradited. It has also highlighted the competition between the European Union and Russia over the values and allegiances of countries in Eastern Europe and the Balkans.