Ukrainian factories for decades have been a key supplier to the Kremlin's war machine, providing jet engines, uranium fuel and electronics for Russia's nuclear arsenal.
That interdependence, created when both were partners in the Soviet Union's Cold War-era arms race, now confronts an independent Ukraine with a strategic conundrum: How to keep legions of local defense industry workers employed when their output can end up in the hands of separatists waging war — often with weapons supplied by Russia — against the government in Kiev.
More than 70% of Ukraine's military exports have gone to Russia in each of the last few years, according to one recent analysis, and it is almost certain that Ukraine is now on the receiving end of some of the deadly materiel.
Tanks and armored vehicles have rolled out by the hundreds each year from the Malyshev factory in suburban Kharkiv, Ukraine's second-largest city. Gun sights and optics from the Dzerzhinsky machine-building plant have given Russian soldiers a better eye on potential enemies.
The Kremlin's postwar military-industrial complex has been so inextricably bundled over the years with components from factories in Ukraine's rust belt region here that defense forces from the two nations have remained entwined throughout the 23 years since the breakup of the Soviet Union.
All of that has suddenly changed in recent months, as Russian troops have rolled into eastern Ukraine, annexing the Crimean peninsula and supporting Russian-speaking separatists in their bid for control over the rest of the region, a conflict that so far has left more than 4,300 people dead.
Suddenly, towns in the Kharkiv region, known around the world for its factories producing armored vehicles and tanks, are face to face with the irony of being threatened with armaments of their own making thundering across the Russian border. Half the region's industrial output was sold to Russia before the outbreak of fighting in April.
"We are at war, and we can't provide the Russian army with technology that can be used against us," said Igor Rainin, Kharkiv's first deputy governor.
In March, shortly after Russian President Vladimir Putin annexed Crimea, the Ukrainian government-run agency that controls arms production, UkrOboronProm, announced a freeze on military exports to Moscow.
Already, it has halted deliveries from the Malyshev tank factory and the Dzerzhinsky machine-building plant in Kharkiv, local officials said. Rainin said local trade with Russia was down by about 40% this year. Ukrainian officials estimate that the cutoff of defense contracts with Moscow could mean the loss of at least $1.5 billion a year, slashing government revenue at a time when the nation's economy is already on its knees.
With the unemployment rate in eastern Ukraine about 13% and rising, and with many in the region having long-standing cultural and economic ties to Russia, the cutoff has led to substantial local resistance. Even some weapons plant workers who staunchly back Ukraine say they are reluctant to see defense contracts scrapped.
In Mykolaiv, near southwestern Ukraine's Black Sea coast, canceled Russian contracts for warship gear assemblies have put entire shipyards out of work.
"A lot of people are very unhappy, and anti-Kiev sentiment is growing in the Mykolaiv region, where three shipbuilding enterprises have closed," said Kost Bondarenko, director of the Institute of Ukrainian Politics, also in the Ukrainian capital.
Kharkiv was occupied by Russia-backed gunmen in April, but a local uprising deposed them before they could secure control of the city of 1.4 million.
Now, the unraveling of joint Ukraine-Russia defense production threatens to deepen the split between Ukrainians loyal to Western-oriented Kiev and those who back continued political alignment with Moscow.
"Kharkiv is still very shaky. If thousands of people were to suddenly lose their jobs, this would create additional tension," said Oleksiy Melnyk, director of international security programs at the Razumkov Center think tank in Kiev. "Russia could take advantage of that situation to further destabilize the region."
Mykolaiv remains under government control, but it is one of a number of eastern and southern hot spots teetering between support for Ukrainian unity and the separatists.
Some of Ukraine's most sophisticated defense output is destined for the International Space Station, and suspension of rocket and module deliveries to Russia could disrupt that surviving vestige of East-West collaboration, Bondarenko said, warning of too literally applying the military export ban.
Ukraine's endemic corruption also plays a role in giving to Russia with one hand what the government has sought to withhold with the other. Local enterprise managers in volatile eastern industrial cities such as Dnipropetrovsk, Zhovti Vody and Zaporizhia skirt the letter of the export ban by invoicing shipments as civilian equipment or redirecting them to third-country middlemen, say defense analysts familiar with Ukraine's cabals of quasi-private business.
Yuzhmash, a sprawling Dnipropetrovsk machine-building works that manufactures and maintains Russia's SS-18 strategic missiles, initially complied with the freeze on exports to Moscow. But in late May, the company announced on its website that the circumstances that had brought about the ban had "stabilized," and it said the company would honor all existing contracts and reopen talks on new projects.
"There is good reason in some cases to continue doing business with Russia," said a Kiev politician from eastern Ukraine who spoke on condition of anonymity because that view doesn't toe the line of official policy. "Do we want to withhold maintenance of Russia's nuclear missiles [potentially risking accidents]? Or deprive Russian nuclear power plants of uranium? We have to be careful not to take steps that could endanger security in either country."
In the midst of bitter armed conflict, Kiev and Moscow both claim to be whittling away at their arms-producing interdependence.
Putin told advisors at a Kremlin meeting in June that he wanted "technological sovereignty" within three years. Kharkiv's Rainin points to the battles ravaging neighboring regions as an abject lesson on Ukraine relying too heavily on a single export market.
Britain's Royal United Services Institute, or RUSI, this year undertook an analysis of Ukraine-Russia defense industry integration and the risks entailed in trying to disentangle it. One daunting possibility, the security analysts said, is that Russia will be inspired to grab what it wants and isn't getting through normal trade.
Mines, foundries, steelworks and heavy-machinery enterprises are scattered along an alluring path flanking the Azov and Black seas that would not only secure Russia's vital defense components but also connect its territory with Crimea.
The temptation to pursue the conquest option may intensify if Russia is unable to procure what it wants from Ukrainian factories, the RUSI report notes.
Renewed Russian troop buildups along the border with Ukraine since separatist elections Nov. 2 and the influx of more armored columns through separatist-occupied regions have raised alarms with the North Atlantic Treaty Organization and the neutral monitors of the Organization for Security and Cooperation in Europe.
"To suggest these scenarios for the sake of capturing the production at these various plants would be a very 19th century way of looking at a 21st century relationship," the RUSI analysts concluded. "However, even that cannot be ruled out in current circumstances."