For the next 15 years, Russia was China's biggest arms supplier, providing $20 billion to $30 billion of fighters, destroyers, submarines, tanks and missiles. It even sold Beijing a license to make the Su-27 fighter jet—with imported Russian parts.
Today, Russia's military bonanza is over, and China's is just beginning.
After decades of importing and reverse-engineering Russian arms, China has reached a tipping point: It now can produce many of its own advanced weapons—including high-tech fighter jets like the Su-27—and is on the verge of building an aircraft carrier.
Not only have Chinese engineers cloned the prized Su-27's avionics and radar but they are fitting it with the last piece in the technological puzzle, a Chinese jet engine.
In the past two years, Beijing hasn't placed a major order from Moscow.
Now, China is starting to export much of this weaponry, undercutting Russia in the developing world, and potentially altering the military balance in several of the world's flash points.
This epochal turnaround was palpable in the Russian pavilion at November's Airshow China in the southern city of Zhuhai. Russia used to be the star of this show, wowing visitors with its "Russian Knights" aerobatic team, showing off fighters, helicopters and cargo planes, and sealing multibillion dollar deals on the sidelines.
This year, it didn't bring a single real aircraft—only a handful of plastic miniatures, tended by a few dozen bored sales staff.
China, by contrast, laid on its biggest commercial display of military technology—almost all based on Russian know-how.
The star guests were the "Sherdils," a Pakistani aerobatic team flying fighter jets that are Russian in origin but are now being produced by Pakistan and China.
"We used to be the senior partner in this relationship—now we're the junior one," said Ruslan Pukhov, of the Russian Defense Ministry's Public Advisory Council, a civilian advisory body to the military.
Russia's predicament mirrors that of many foreign companies as China starts to compete in global markets with advanced trains, power-generating equipment and other civilian products based on technology obtained from the West.
In this case, there is an additional security dimension, however: China is developing weapons systems, including aircraft carriers and carrier-based fighters, that could threaten Taiwan and test U.S. control of the Western Pacific.
Chinese exports of fighters and other advanced weapons also threaten to alter the military balance in South Asia, Sudan and Iran.
China's military muscle still lags far behind that of the U.S., by far the world's largest weapons manufacturer and exporter. China accounted for 2% of global arms transfers between 2005-2009, putting it in ninth place among exporters, according to the Stockholm International Peace Research Institute (SIPRI).
But no other Asian country has sought to project military power—and had the indigenous capability to do so—since Japan's defeat in 1945.
China's rapid mastery of Russian technology raises questions about U.S. cooperation with the civilian faces of Chinese arms makers.
The Aviation Industry Corp. (AVIC), China's state aerospace company, builds fighters, for instance. But it is also making a new passenger jet with help from General Electric Co. and other U.S. aerospace companies. A GE official says the company has partnered with foreign engine manufacturers for decades "with elaborate protections built in place" that have preserved the company's intellectual property.
There are also implications for U.S. weapons programs. Last year the Pentagon decided to cut funding for the F-22—currently the most advanced fighter deployed in the world—partly on the grounds that China wouldn't have many similar aircraft for at least 15 years.
But then Gen. He Weirong, deputy head of China's Air Force, announced that Chinese versions of such jets were about to undergo test flights, and would be deployed in "eight or 10 years."
The Defense Intelligence Agency now says it will take China "about 10 years" to deploy stealth fighters in "meaningful numbers."
For Moscow and Beijing, meanwhile, a dispute over the intellectual-property rights to such weaponry is testing their efforts to overcome a long historical rivalry and build a new era of friendly ties.
"We didn't pay enough attention to our intellectual property in the past," said a Russian defense official. "Now China is even competing with us on the international market."
Few things illustrate this more clearly than the J-11B, a Chinese fighter that Russian officials allege is a direct copy of the Su-27, a one-seat fighter that was developed by the Soviets through the 1970s and 1980s as a match for the U.S. F-15 and F-16.
Before the early 1990s, Moscow hadn't provided major arms to Beijing since an ideological split in 1956, which led to a brief border clash in 1969.
But after the collapse of the Soviet Union, the Kremlin was desperate for hard currency. In 1992, China became the first country outside the former Soviet Union to buy the Su-27, paying $1 billion for 24.
The deal was a coup for China, which had shifted its military focus away from a potential Soviet land invasion, and now wanted to defend territorial claims over Taiwan and parts of the South China Sea and East China Sea.
Efforts to upgrade its air and naval forces had been hampered by U.S. and European Union arms embargoes imposed after the 1989 crackdown on protesters around Tiananmen Square.
China's military modernization program grew more urgent after its leaders were stunned by the display of U.S. firepower during the first Gulf War, Western military officials say.
Beijing's breakthrough came in 1996, when it paid Russia $2.5 billion for a license to assemble another 200 Su-27s at the Shenyang Aircraft Company.
The agreement stipulated that the aircraft—to be called the J-11—would include imported Russian avionics, radars and engines and couldn't be exported.
But after building 105, China abruptly canceled the contract in 2004, claiming the aircraft no longer met its requirements, according to Russian officials and defense experts.
Three years later, Russia's fears were confirmed when China unveiled its own version of the fighter jet—the J-11B—on state television.
"When the license was sold, everyone knew they would do this. It was just a risk that was taken," said Vassily Kashin, a Russian expert on the Chinese military. "At that time it was a question of survival."
The J-11B looked almost identical to the Su-27, but China said it was 90% indigenous and included more advanced Chinese avionics and radars. Only the engine was still Russian, China said.
Now it is being fitted with a Chinese engine as well, according to Zhang Xinguo, deputy president of AVIC, which includes Shenyang Aircraft.
"You cannot say it's just a copy," he said. "Mobile phones all look similar. But technology is developing very quickly. Even if it looks the same, everything inside cannot be the same."
The J-11B presented Russia with a stark choice—to continue selling China weapons, and risk having them cloned, too, or to stop, and miss out on its still lucrative market.
Russia's initial response was to suspend talks on selling China the Su-33, a fighter with folding wings that can be used on aircraft carriers.
Since then, however, it has re-opened negotiations on the Su-33, although it rejected China's offer to buy just two, and insisted on a larger order.
Sukhoi Aviation Holding Co.'s official position now is that it remains confident about its business in China.
Indeed, many aviation experts believe AVIC is having problems developing an indigenous engine for the J-11B with the same thrust and durability as the original Russian ones.
Sukhoi is betting that China will have to buy the Su-33 on Russian terms as Beijing will struggle to develop its own carrier-based fighter in time for the planned launch of its first carriers in 2011 or 2012.
The company also hopes to sell China the Su-35—a more advanced version of the Su-27—if the J-11B doesn't perform well enough.
"We're just hoping our aircraft will be better," said Sergey Sergeev, deputy director general of Sukhoi. "It's one thing to make a good quality copy of a spoon, but quite another to make one of an aircraft."
The Russian and Chinese governments both declined to comment.
In private, however, Russian officials say they worry that China is about to start mass producing and exporting advanced fighters—without Russian help. China bought $16 billion worth of Russian arms between 2001 and 2008—40% of Russia's sales.
Photographs published recently on Chinese military websites appear to show engines fitted on the J-11B and a modified version—called the J-15—for use on aircraft carriers.
That has compounded Russian fears that China has reverse engineered an Su-33 prototype it acquired in 2001 from Ukraine, according to Russian defense experts.
At last year's Dubai Air Show, China demonstrated its L-15 trainer jet for the first time. In June, China made its debut at the Eurosatory arms fair in France.
In July, China demonstrated the JF-17—the fighter developed with Pakistan—for the first time overseas at the Farnborough Airshow in Britain.
China also had one of the biggest pavilions at an arms fair in Capetown in September.
"They're showing up at arms fairs they've never been to before," said Siemon T. Wezeman, an arms trade expert at SIPRI. "Whereas 15 years ago they had nothing really, now they're offering reasonable technology at a reasonable price."
China is generating particular interest among developing countries, especially with the relatively cheap JF-17 fighter with a Russian engine.
The Kremlin has approved the re-export of the engine to Pakistan, as it has no arms business there.
But it was enraged last year when Azerbaijan, an ex-Soviet republic, began talks on buying JF-17s, according to people familiar with the situation.
Also last year, China's JF-17s and Russia's MiG-29s competed in a tender from Myanmar, which eventually chose the Russians, but paid less than they wanted.
This year, both entered a tender from Egypt, with China offering the JF-17 for $10 million less than Russia's $30 million MiG-29.
That prompted Mikhail Pogosyan, who heads Sukhoi and the company that makes MiGs, to suggest that the Kremlin stop selling China the Russian engines for the JF-17.
The Kremlin hasn't done that yet, but Russian officials have suggested privately taking legal action if China exports more advanced jets like the J-11B.
Last month, Russia's government proposed new legislation attaching an intellectual property rights clause to foreign military sales agreements.
The issue was raised during a visit by President Dmitry Medvedev to China in October, according to people familiar with the situation.
"Of course we're concerned, but we also recognize there's very little we can do," said Mr. Pukhov, of the Russian Defense Ministry's Public Advisory Council.
Asked what advice he would give Western aerospace firms, Sukhoi's Mr. Sergeev said: "They should keep in mind what products they're selling—whether they're civilian or dual use. And most important is to prepare very carefully your contract documents."
While Russia worries about intellectual property, other countries are concerned about security. The arms programs China initiated two or three decades ago are starting to bear fruit, with serious implications for the regional—and global—military balance.
The J-11B is expected to be used by the Chinese navy as its frontline fighter, capable of sustained combat over the entire East China Sea and South China Sea.
Aircraft carriers and J-15 fighters would further enhance its ability to stop the U.S. intervening in a conflict over Taiwan, and test its control of the Western Pacific.
China's arms exports could have repercussions on regions in conflict around the world. Pakistan inducted its first squadron of Chinese-made fighter jets in February, potentially altering the military balance with India.
Other potential buyers of China's JF-17 fighter jet include Sri Lanka, Bangladesh, Venezuela, Nigeria, Morocco and Turkey. In the past, China has also sold fighters to Sudan.
The potential customer of greatest concern to the U.S. is Iran, which purchased about $260 million of weapons from China between 2002-2009, according to Russia's Centre for Analysis of the Global Arms Trade.
In June, China backed U.N. sanctions on Iran, including an expanded arms embargo, but Tehran continues to seek Chinese fighters and other weaponry.