ZHYTOMYR, Ukraine (NYTIMES) - The North Korean spy, posing as a member of his country's trade delegation in Belarus, thought he was photographing a secret scientific report on missile technology as he snapped away with a small camera in a dingy garage in the Ukrainian city of Dnipro, the home of Ukraine's Soviet-era rocket industry.
But the report he took pictures of was a fake, part of a sting operation mounted by Ukraine's security service to prevent the leak of missile secrets, and now the spy, 56-year-old Ri Tae Gil, is in prison convicted of espionage.
He sleeps on the bottom bunk in a cell shared with eight Ukrainian inmates, four of them convicted murderers.
His July 2011 arrest in eastern Ukraine along with a fellow North Korean spy, which was first reported earlier this month (September) by CNN, shows the extent to which Pyongyang has scoured the world for foreign technology to reinvigorate what had been a faltering programme to develop long-range missiles.
Ri and his partner, Ryu Song Chol, 46, were arrested just a few days before North Korea's then leader Kim Jong Il announced during a visit to Russia that Pyongyang was considering a moratorium on missile production and nuclear weapons testing. The moratorium never came about.
Instead, following Mr Kim's death in December 2011 and the ascent to power of his son Kim Jong Un, Pyongyang ramped up both its nuclear and missile programmes.
In July this year, North Korea for the first time launched missiles that experts said were capable of hitting the United States.
While speaking good Russian, which is widely spoken in Ukraine, Ri does not talk much, his cellmates said, but he does watch a lot of television, particularly reports on the accelerating progress of a North Korean missile programme that he had tried in vain to serve. Instead of prized secrets, he received an eight-year prison term for espionage.
His fourth floor cell at the No. 8 Prison in Zhytomyr, a hulking brick building built during the reign of Russia's last czar, has cable TV. A brick wall in the courtyard below offers a grim reminder of less accommodating times: It is pockmarked with bullet holes left by Stalin's secret police, the NKVD, later renamed the KGB, which used the spot to execute prisoners.
Asked in an interview whether he felt pride at North Korea's recent string of successful launches, Ri, who has a family back in Pyongyang, blanched and said he did not want to talk about rockets.
Apparently eager to counter a widespread belief that North Korea had made such fast progress by stealing foreign technology, he said that his country "has had good rockets for more than 20 years" and also very good engineers.
Mr Denis Chernyshov, Ukraine's Deputy Minister of Justice, described Ri and Ryu as "very well trained. They are tough guys, real spies", he said.
He noted that, despite six years of detention, they had never written or received letters from family or friends. "They live in a total vacuum," Mr Chernyshov said.
After a string of failed tests with an intermediate range missile, Musudan, that had been the target of US sabotage, North Korea last year suddenly and mysteriously found success.
It began with the rollout of a new missile in September that not only worked but also demonstrated a capability to travel ever further distances in a series of tests since then. In July, Pyongyang launched a missile capable of reaching the US.
Seeking to explain North Korea's mysterious success, some experts have pointed a finger at Ukraine, particularly the Yuzhmash rocket factory and its Yuzhnoye design bureau in Dnipro, the town where Ri and Ryu were arrested.
Ukraine has adamantly denied allowing leaks of missile technology, pointing to the arrest and conviction of the two spies as proof that the country is capable of combating North Koreans hunting for missile secrets.
Ukrainian rockets mostly date to Soviet times but are still far more advanced than anything Pyongyang had until recently been able to produce.
Mr Alexander Turchynov, the head of Ukraine's security and defence council, said it was "completely impossible" that North Korea obtained either missile engines or their design documents from Ukraine.
The RD-250, a Soviet-era rocket engine that some experts say resembles engines used in recent North Korean launches, used to be produced in Dnipro, Mr Turchynov said, but production stopped in 1991. The entire production line, he said, was dismantled in 1994.
Moreover, he added, Ukraine never made whole engines but only supplied parts to the RD-250's main manufacturer, Energomash, in Russia.
When The New York Times requested permission to visit the Dnipro complex, however, the Yuzhmash factory declined to receive a reporter from the paper. This was despite a plea in August by Ukraine's President Petro Poroshenko, made in response to a Times article about possible technology leakage from Dnipro, that reporters from the paper visit the factory to "meet Ukrainian partners who have been wrongfully blamed".
Ukraine is particularly sensitive to allegations that it has undermined non-proliferation efforts because it voluntarily gave up a nuclear arsenal it inherited from the Soviet Union. That surrender of power left it highly vulnerable to nuclear-armed Russia when Moscow annexed Crimea in March 2014.
Ukraine's domestic intelligence agency, known as the SBU, says it has been tracking North Korean efforts to steal missile technology for years. In addition to arresting Ri and Ryu, Ukraine expelled two North Korean diplomats accredited in Moscow who were accused of trying to obtain Ukrainian secrets.
Ri and Ryu were caught red-handed taking photographs of what had been presented to them as a classified dissertation by rocket scientist S.A. Davidov, titled "Forecast methods of the performance capability of capillary intake devices in the fuel tanks of space vehicles".
Mastery of such intake devices would have helped North Korean engineers ensure the steady, uninterrupted flow of fuel, a hurdle that can impede the construction of reliable rocket engines. The dissertation the North Korean pair were given to photograph, however, had been gutted of secret information and filled with useless technical details.
Ri received the fake secrets from Mr V.A. Plekhanov, an employee at Dnipro's Yuzhnoye design bureau, whom the North Korean had first tried to suborn by appealing to him on ideological grounds as a communist before offering him about US$1,000, the Ukrainian authorities said.
Unbeknown to the North Koreans, Mr Plekhanov alerted the SBU and a trap was set in a cluttered backstreet garage where he had agreed to hand over the missile secrets. The North Koreans were both seized, along with the camera they used to take photos of the documents.
With Ri and Ryu now approaching the end of their prison terms - they are scheduled for release next September because their sentences were reduced by two days for every day served in pretrial detention - Ukraine is wondering what will happen to them next.
Neither man, according to their cellmates and prison officials, has expressed any eagerness to go back to North Korea, fearing what awaits them and their families. Ukrainian officials believe they may request political asylum in Ukraine or another country after their release, though neither has so far made a request to stay.
When Ryu, who is held in a correctional facility next door to Ri's prison in Zhytomyr, was led into a visiting room for an interview he quickly covered his face and tried to run away. "I have nothing to say. Get away from me," he shouted. "I want to live safely."
Ri, in a separate meeting, was less abrupt but also declined to answer all but a few preliminary questions.
Mr Anatoly Gabitov, the deputy warden, described Ri as a "super inmate" who never causes trouble. "I wish all our prisoners were like him," he said.
The North Korean spy, however, may not be quite what he seems: On a bookshelf next to his bed is a Russian-language translation of "The Count of Monte Cristo", the French novel whose protagonist considers himself wrongly imprisoned and, after a spectacular escape, sets about taking revenge on all those responsible for his incarceration.