KYIV -- A ruling by a Kyiv district court to place Ukraine's top tax official under arrest pending trial on embezzlement charges is being heralded as a landmark win for the country's independent anticorruption agency and civil society as a whole in its uphill battle against entrenched graft.

The arrest of Roman Nasirov, chief of Ukraine's Fiscal Service, culminated a dramatic marathon hearing that closed early on March 7 when the Solomyansky district court ordered him to spend 60 days in pretrial detention.

The judge made Nasirov surrender his foreign passport and said he would be granted house arrest if he posted 100 million hryvnyas ($3.7 million), a remarkable bail sum in Ukraine. If he makes bail, the judge added, he must wear an electronic monitoring bracelet.

Nasirov, an ally of President Petro Poroshenko, was removed from his post on March 3 pending an investigation into allegations that he defrauded the state of 2 billion hryvnyas to the benefit of fugitive Ukrainian lawmaker Oleksandr Onyshchenko.

Onyshchenko, who has bounced around Western Europe since fleeing Ukraine last year after Kyiv began investigating him over the alleged theft of $64 million from a state gas producer, has accused Poroshenko of stealing money from state companies. The president's administration denies those charges.

But while Onyshchenko remains beyond the reach of Ukrainian authorities, Nasirov does not. And his case has supercharged Ukrainian civil society and anticorruption activists yearning for signs that the country is ready to turn the corner in its long-running fight against top-level graft.

"We've already done a very big thing," no matter what the outcome is, Mustafa Nayyem, a lawmaker and anticorruption campaigner who at one point put out a Facebook call for demonstrators to surround the courthouse to deter Nasirov's release, told RFE/RL early on March 7.

With Nasirov's arrest, Nayyem said, powerful figures who may have felt "untouchable" now have a sense of "how it tastes" to be held to account "even if you are a close friend of the president."

"Yesterday [Nasirov] was a millionaire with a big car...and he was sure he would be released. But today, and for 60 more days, he is in jail."

International financial institutions have threatened to hold up billions of dollars aimed at propping up Kyiv's fiscal goals and the currency, the hryvnya, without greater reform and better curbs on corruption. And last year, a handful of senior officials including cabinet ministers and the governor of Odesa resigned over what they said was a lack of political will to stem corruption.

Historic Case

Daria Kalenyuk, executive director of the Kyiv-based NGO Anticorruption Action Center, called Nasirov's arrest "historic" and one of the biggest legal challenges for Ukrainian authorities since the country spun off from the Soviet Union in 1991.

"It is the first time since [Ukraine's] independence that a person in such a top, influential office in Ukraine, through which millions of funds are transferred daily, has been arrested and charged with corruption," Kalenyuk told RFE/RL.

Poroshenko applauded the new National Anticorruption Bureau (NABU)'s case against Nasirov, who was elected to parliament on the president's Bloc of Petro Poroshenko party ticket in 2014 before being promoted to tax chief. He called it "a shining example" of the effectiveness of anticorruption reforms in Ukraine and proof of the bureau's independence.

"As of today, a high-ranking official is notified of suspicion without informing the president. I think this is exactly what we sought while creating an independent agency," Poroshenko said via his press service on March 6.

But Nasirov nearly slipped from the NABU's grasp after the case took several bizarre turns.

Arrest In Three Acts

The first act of Ukraine's latest political drama began late on March 2, when Nasirov claimed to have suffered a heart attack as NABU investigators closed in on him. Later, he was taken on a stretcher, seemingly unconscious, to the upscale Feofania hospital in Kyiv, where the authorities filmed him lying in a bed seemingly fit for a five-star Kyiv hotel as they read out the charges against him. Nasirov's lawyers said he was detained illegally.

WATCH: Ukraine Tax Chief Falls Ill As He Faces Corruption Charges

​

The theatrics dragged into March 5, when no judge could be found for a hearing on Nasirov's detention. As the 72-hour deadline for his detention neared at midnight, hundreds of protesters gathered outside the courthouse, blockading it until early March 6 to ensure the tax chief did not leave before a judge arrived.

"We couldn't give him a chance to flee like [other allegedly corrupt officials]," lawmaker Nayyem said.

He was referring to functionaries under ousted President Viktor Yanukovych who fled to Russia during the Euromaidan unrest in 2014 and are still under investigation by the current authorities.

Ukrainian activist Kateryna Kruk celebrated the human ring-fencing of the courthouse as a mark of "determination" by citizens to "make sure law is respected."

Activists believe Nasirov to be a flight risk because he possesses Hungarian and British passports, along with his Ukrainian citizenship, according to the NABU.

A public, online wealth-declaration database suggests that Nasirov, along with his wife, keeps cash in dollars and euros worth $2.2 million.

Eventually a judge arrived at the court on March 6 and the hearing on Nasirov's detention got under way. Proceedings dragged on for more than 14 hours until 3:13 a.m. the next day, when in a dramatic finish to the proceedings the court remanded Nasirov to two months of pretrial detention.

The decision has sent a buzz through Ukrainian society, especially among anticorruption activists hungry for signs that the country can turn a corner in the long-running battle against top-level graft.

Many rejoiced on social media, where some called it a "massive win" or shared thumbs-up emojis at news of the high bail.

Harbinger Of More Unrest?

But some experts fear it could provoke a political crisis in Ukraine -- a country still in the throes of an economic crisis brought on by the 2013-14 revolution and a bloody war with Russia-backed separatists in its east that has killed more than 9,750 people over the course of nearly three years, according to UN estimates.

Volodymyr Fesenko, chairman of the Kyiv-based Penta Center for Applied Political Studies, told Interfax-Ukraine on March 7 that the Nasirov case was "explosive," adding that, at least in the coming months, it will be one of the main factors in the course of political developments in Ukraine, which ranks 131st out of 176 countries in Transparency International's Corruption Perceptions Index.

Nayyem, whose post on Facebook in November 2013 helped jump-start the protests that transformed into the unrest that toppled the Yanukovych government, predicted that Kyiv will see a new series of protests over the next "four or five months" to keep pressure on authorities -- and specifically on Ukraine's notoriously corrupt judicial system -- to try the Nasirov case.

"Yes, we have problems with prosecutors, problems with our court systems, an inexperienced [NABU]. But we have an inspired Ukrainian society that is asking for justice," Nayyem said.

Kalenyuk said this is where a special, independent anticorruption court would come in handy. Activists hope one will be formed by year's end.

It is something that Kyiv's Western backers, including the United States, appear to support.

Until then, Kalenyuk said, it is up to civil society and media to keep pressure on authorities to see the Nasirov case through.

"It will be much harder to sabotage [the trial] if there is constant attention on it," she said.