SKOPJE, Macedonia — A former Macedonian prime minister who fled the country while facing a prison sentence on corruption charges claimed on Tuesday that he had been granted political asylum in Hungary.

The former leader, Nikola Gruevski — who ran the country as a strongman for a decade before being forced out of office in 2016 after nationwide protests — had been sentenced to two years in prison for abusing the power of his office to purchase a luxury vehicle.

He also faces several more serious charges, some stemming from a vast scandal involving hundreds of thousands of secretly recorded conversations in which top government officials were heard discussing crimes like rigging votes and covering up killings.

American diplomats and European officials viewed his trial and conviction as a step forward in a region plagued by corruption and ethnic divisions. Macedonia aspires to join the European Union, and his trial was widely seen as sending a clear message that even the most powerful politicians could not act with impunity.