The Russian and Chinese aerospace programs may have found a mutual solution to alleviate their respective problems. Russia’s aerospace sector, despite its economic woes, is thriving on the wealth of institutional knowledge and expertise amassed during the Soviet era. Meanwhile, China’s, though financially stable, still suffers from the technological deficit that has long plagued it. When Russian President Vladimir Putin heads to Beijing on Saturday to meet with his Chinese counterpart, several key figures from Russia’s aerospace industry will join him. The two countries seem ideally poised to cooperate: Russia needs cash, and China needs technology. But for Russia, the long-term stakes of such an arrangement are higher.

Russia has a long history of exporting aerospace technologies and weaponry to China. In the decade following the collapse of the Soviet Union, arms sales to India and China kept Russia’s defense industry afloat, enabling research and development at a time when Moscow’s own military funding had dried up. China, in turn, benefited from the influx of Russian technology, which helped to modernize China’s obsolescent military. But after China reverse-engineered the Russian Su-27SK air superiority fighter and began producing its own version, the J-11B, Moscow grew wary of selling Beijing advanced weaponry. At the same time, China developed its own indigenous defense industry. This reduced China’s dependence on Russian technology, while also raising concerns in Moscow that Beijing could become a serious competitor in the international arms trade. As a result, defense exchanges between the two countries waned.

Now, Moscow and Beijing have returned to their arms trade. In November 2015, China arranged to buy 24 Russian Su-35 fighter jets, worth approximately $2 billion, and later purchased S-400 surface-to-air missiles and other equipment. Moscow is no longer reluctant to sell its cutting-edge technology to Beijing, in part because of China’s promises not to copy weapons outright. More than Beijing’s assurances, however, tight economic constraints are forcing Moscow’s hand. Once again, Russia is looking to the export market to sustain its defense industry, this time to modernize its own military.

Ahead of Putin’s visit, China has already highlighted areas of its military and commercial aerospace industries for cultivation. Jet and rocket engines have long posed a challenge to the Chinese aerospace industry, and it will continue to rely on Russia for these technologies. For over a decade now, China has been developing the YF-100 rocket engine — a design derived from the Soviet-era RD-120 engines that China acquired 20 years ago — to power the first stage of its latest Long March rockets. Eventually, the rockets will form the basis of China’s space launch capability. In addition, the two countries are exploring a deal in which Russia would export its newer RD-180 rocket engines to China. Finding a reliable consumer for the RD-180s is a priority for Russia’s military-industrial complex. The engines’ largest market, the United States, has been inching closer to blocking their import; on June 14, the U.S. Senate limited future purchases to just 18 rockets. China would be a natural and welcome replacement.

China has also made a huge push into building its own commercial aircraft. After years of development, the country’s first two commercial planes — the Comac ARJ21 and C919 — have still not entered service. Since many of the planes’ components, including the jet engines, are foreign-produced, Beijing will likely take advantage of Putin’s visit to sign an agreement on engine production and import.

For Beijing, a more competitive aerospace industry is an important goal. It will reduce China’s dependence on foreign suppliers in the near term and will pave the way for China to become a major force in the sector down the line. Although Russia understands China’s ambitions, it cannot afford to undermine them by limiting Beijing’s imports once again. Despite the long-term consequences of helping its biggest potential customer to eventually supplant it, Russia’s aerospace industry is focused on an immediate goal: survival.