KYIV -- Ukrainian prosecutor Oleh Valendyuk should have been out of a job last fall, the victim of a lustration law meant to clear away members of former President Viktor Yanukovych's team after his ouster at the hands of pro-European protesters.
Instead, Valendyuk holds a higher position than ever: he is the top prosecutor in the capital, Kyiv.
His story is a case study in the government's struggles to put the corruption-riddled past behind it and start with a clean slate, setting the stage for reforms needed to improve the nation's economy and make it less vulnerable to Russia.
The position he held before the Euromaidan protests toppled Yanukovych in February 2014 put Valendyuk squarely in the ranks of officials subject to lustration and barred from holding public office under a law adopted in September.
But Valendyuk used his connections, his 18 years of experience, and his intimate knowledge of Ukraine's graft-marred legal system to win an exception.
And he did it in just three business days.
Like similar processes in former Soviet and Eastern Bloc states after the collapse of communism, Ukraine's law on lustration is a crucial part of the pro-Western government's bid to shake off the Yanukovych era -- and with it the legacy of decades of domination by Moscow, whose danger has been reinforced by Russia's annexation of Crimea and the deadly conflict with Kremlin-backed separatists who have seized parts of the Donbas region.
The law on lustration, or cleansing the ranks of power, came into effect on October 15. That day, Valendyuk -- then a deputy department chief at the Ukrainian Prosecutor-General's Office -- sent a letter to the prosecutor-general asking whether he would fall under lustration.
The answer came the next day, October 16: Yes.
Valendyuk challenged that on Friday, October 17, asking a court to issue a preventive ban on his dismissal. The following Monday, October 20, the ban was approved – the key first step in a process that has enabled him to avoid lustration altogether.
The process was astoundingly speedy for Ukraine, where bureaucratic procedures can take months to complete and cases often drag on for ages in the overcrowded courts.
Asked how long it takes an ordinary citizen to receive a written response from a prosecutor in any given case, Valendyuk himself told RFE/RL's Ukrainian service: "Depending on whether a check is needed, it might be either 15 days or a month, 30 days."
Tetyana Kozachenko, head of the Justice Ministry department that handles the process of cleansing the government of tainted senior officials, said the fast-tracking of the procedure in Valendyuk's case is incredible.
"I think he did a great job at avoiding lustration," she said.
Kozachenko said that Valendyuk was previously a deputy head of the department that represented the Prosecutor-General's Office in the courts, and knows the inner workings of the system very well.
"He has connections and possibilities, the understanding of process, the people who work there, and ability to get the needed decisions -- including ones in his favor," said Kozachenko. Those words could describe any slippery, successful careerist in the former Soviet Union or its successor states: exactly the atmosphere that Ukraine is struggling to dispel.
Valendyuk denies any wrongdoing, asserting that the court decision protecting him from lustration restored justice because, he argues, he had no management power under Yanukovych.
He categorically disagrees that he falls under the legal criteria for lustration.
But Kozachenko is not convinced.
"According to the criteria, the time when he held the job and its seniority mean he has to be banned," she said.
In another twist, the October 21 ruling in Valendyuk's favor was kept secret, even though by law, all court rulings must be published in an open electronic registry the day after they are issued.
Volodymyr Kaluha, deputy head of the state company that runs the electronic registry, said that the court sat on the paper for four months before sending it on.
The company that keeps the registry then held the ruling for two months before it finally appeared online, Kaluha said.
Why this happened will be a subject to the next internal check," he said.
Valendyuk had no explanation for the delay. "I have no relation to the electronic registry of court decisions," he said.
Markiyan Halabala, deputy head of an independent body set up to investigate judges and the rulings they issued during the protests that pushed Yanukovych out, said he knows why the ruling was hidden from the public eye.
"The answer is simple. It's corruption," he said.
Halabala says that the Kyiv district administrative court judge who issued the ruling should be lustrated also.
The judge, Viktor Danylyshyn, banned public gatherings on Kyiv's central streets on November 21, 2013, as the protests against Yanukovych -- over the about-face in which he spurned a planned deal with the European Union and turned toward Russia -- were gaining momentum.
Hundreds of thousands of people turned out at street protests the following weekend in a show of defiance, and Yanukovych fled to Russia three months later as his hold on power crumbled.
More than 620 former officials have been lustrated so far, according to the Justice Ministry.