A fraught arms race, involving ballistic missiles, helicopter gunships, multiple rocket systems and even nuclear material smuggling, has escalated to the brink of war this year.

The contenders: Armenia and Azerbaijan, two states with populations roughly equivalent to those of Connecticut and New Jersey, respectively. And Moscow is providing most of the advanced weaponry to both sides.

For twenty-eight years, the Muslim Azerbaijanis and Christian Armenians have been involved in a bitter conflict over the region of Nagorno-Karabakh, with historical roots stretching back to World War I. Essentially, Nagorno-Karabakh is a diverse region with an Armenian majority that was administratively part of Azerbaijan during the Soviet era. In 1988, before the fall of the Soviet Union, the local government of Nagorno-Karabakh voted to join the Armenian Republic. The political conflict escalated into a full-blown conventional war, involving tanks, artillery and jet fighters. Both sides committed atrocities and pursued campaigns of ethnic cleansing.

Russian soldiers and equipment at first flowed to both parties in the conflict, but over time Moscow came increasingly to support the Armenian side. More than thirty thousand were dead by the time a cease-fire was declared in 1944, leaving Armenians in control of a de facto Nagorno-Karabakh Republic, which lacked international recognition. Unfortunately, the wounds left by the war have only festered with time, and sporadic fighting is believed to have killed more than three thousand since the cease-fire was declared.

A look at the demographics of the two countries today reveals the curious nature of the conflict. Armenia has a population around three million—while Azerbaijan’s approaches ten million. Furthermore, Azerbaijan has nearly twice the GDP per capita, thanks to its abundant oil wealth. Azerbaijan’s defense budget exceeds Armenia’s total national budget. By any normal analysis, the Armenians should be heavily outgunned. Yet the Armenian side has historically been more militarily successful.

One factor has clearly been support from Russia, the undisputed regional hegemon of that corner of the South Caucasus. Russia maintains a close alliance with Armenia today. That support is manifest in the five thousand Russian troops based in the Armenian city of Gyumri, as well as extensive arms sales. This February, Russia announced a loan of $200 million to Armenia to purchase BM-30 Smerch multiple-rocket launchers and various man-portable antitank and antiaircraft missiles. A year earlier, Russia transferred six Mi-24P attack helicopters to Armenia.

In November 14, Moscow even announced it would form a joint military force with Armenia for the mutual protection of their borders. The alliance would also offer Armenia access to Russian arms at domestic prices. However, the alliance would not pertain to the Nagorno-Karabakh conflict.

Yet Azerbaijan, too, receives 85 percent of its arms from Russia, according to a SIPRI report—to the tune of $4 billion in Russian arms between 2010 and 2014. The heavy weapons purchased by the petrostate include one hundred T-90 tanks, a battalion of eighteen relatively modern 2S19 Msta self-propelled howitzers, two batteries of long-range S-300PMU surface-to-air missiles and over one hundred helicopters, including eighteen Mi-35 gunships.

Unfortunately, the occasional border clashes between Armenia and Azerbaijan have escalated steadily in the last decade, culminating this April in the bloodiest fighting since the cease-fire was declared. Amidst allegations by both sides of cease-fire violations, Azerbaijan launched a full-scale assault with infantry, tanks, attack helicopters, drones and artillery on the Nagorno-Karabakh lines. Four days of fighting ensued, with a new cease-fire leaving Azerbaijan with some minor territorial gains.

Armenia claimed the loss of ninety-one soldiers in the conflict, while the U.S. Department of State estimated around 350 deaths on the Azerbaijani side. (The official Azerbaijani claim of thirty-one battle deaths is not considered credible.) Several helicopters and at least fourteen tanks were also lost. Despite the heavy casualties, the conflict is perceived as the most successful Azerbaijani military offensive to date.

It did not escape Armenia’s attention that the Mi-35 helicopter gunships, TOS-1 rocket launchers and Smerch rocket systems that pounded Armenian troops in April came from their ostensible ally, prompting a rise in anti-Russian sentiment.

Most observers believe the two nations are likely to engage in another round of intensified fighting unless the situation changes. Ongoing attempts at mediation involving both Russia and the United States have largely floundered. Instead, the feuding states have escalated their military buildup.

The most noteworthy development has been Armenia’s parading of advanced Iskander ballistic-missile systems in September. Armenia is the only foreign country to acquire the Russian missile, despite bids from wealthier nations such as South Korea. Armenian president Serzh Sargsyan argued the missiles were necessary to balance Armenia’s defense capabilities against Azerbaijan’s larger financial means, a line of reasoning echoed by Moscow.

Although some media reports these are Iskander-M missiles, most experts believe Russian claims that they are downgraded Iskander-Es. The Iskander-E has a range of 280 kilometers and can land within ten meters of a designated target, while the M can reach up to five hundred kilometers and has an accurate radius of seven meters. Either type would not only threaten Azerbaijan’s artillery positions and command headquarters along the border, but could also be used to launch strategic attacks against Azerbaijan’s oil industry.

The Iskander missiles are nuclear-capable, and though it may seem absurd at first glance to suggest that a country of three million could develop nuclear weapons capability, there are reasons for concern. Armenia already operates a civilian nuclear power plant at Metsamor with staff trained in nuclear science. Furthermore, there has been an alarmingly high number of arrests of Armenians attempting to smuggle uranium out of the country. To top it off, Prime Minister Hrant Bagratyan claimed on April 29 that Armenia either had a nuclear weapon, or the capability of creating one. Other military officials have made comments suggesting that Armenia is developing nuclear arms.

While these claims likely involve a lot bluster, they could imply real efforts to develop nuclear arms despite Armenia being a party to the Non-Proliferation Treaty. At the very least, it seems likely Armenia could field radioactive “dirty bombs” if it wished to—and with the Iskanders, it now has the capability to strike at targets deep inside Azerbaijan.

Both Armenia and Azerbaijan also operate older Tochka ballistic missiles, which have proven capable of wreaking considerable devastation despite their age.

Russia has also sold to both sides powerful rocket artillery with the potential to cause civilian casualties because of their broad areas of effect. Thirty BM-30 Smerch multiple-rocket launcher systems have been sold to Azerbaijan, and six to Armenia. Each Smerch can launch a volley of twelve three-hundred-millimeter rockets loaded with cluster munitions up to a range of ninety kilometers.

The Smerch rockets can also employ thermobaric warheads, as does the TOS-1 short-range rocket system, mounting thirty 230-millimeter rockets on a tank hull. Thermobaric warheads ignite the air itself using a chemical aerosol; the resulting massive blast crushes the internal organs of those it doesn’t burn alive. Russia sold eighteen TOS-1 launchers to Azerbaijan—and then sold an unspecified number to Armenia to “balance” things. Both these weapons were involved prominently in the fighting in April.

Unlike Armenia, Azerbaijan benefits from a number of alternate military suppliers. Israel has sold a variety of drones to Azerbaijan, most notably the Israeli Aerospace Industries Harop (Harpy) “suicide drone,” which can either be remotely guided or be launched in fire-and-forget mode. One of the kamikaze drones blew up a bus full of Armenian volunteers on April 4, killing seven.

Baku has also boasted it is set to acquire Israel’s advanced Iron Dome air-defense system designed to shoot down hostile rockets and missiles. However, some analysts are skeptical that the deal will go through because of the system’s cost and likely inadequacy for countering the Iskander missile.

Azerbaijan is also backed by Turkey, further complicating the web of alliances. The Armenians bitterly recall the genocidal deeds of Turkish troops during World War I, which Ankara vehemently maintains were ordinary acts of war. Azerbaijan army sports Turkish Cobra armored cars, ZPT mine-resistant vehicles and several multiple-rocket launcher systems produced by Roketsan.

Moscow maintains that is preserving the peace by keeping the “military parity” between Armenia and Azerbaijan. More candidly, spokesmen have argued that if Russia didn’t supply the weapons, they would simply be purchased elsewhere. By keeping both Armenia and Azerbaijan dependent on Russia arms—and in a state of permanent military insecurity—Moscow maintains its influence over both, and denies opportunities to other international powers to acquire leverage.

But the escalating arms race has emboldened both countries to pursue a military solution to the Nagorno-Karabakh conflict. Azerbaijan’s superior financial means have allowed it to build up a conventional edge that Baku believes may allow it to dislodge Armenian troops from the Nagorno-Karabakh region. By contrast, Yerevan believes its new Iskander missiles will give it the capability to devastate strategic targets in Azerbaijan, thus serving as a deterrent for major Azerbaijani attacks. These beliefs do not bode well for avoiding future conflict.

Moscow is involved in genuine attempts to de-escalate hostilities between the two countries in the South Caucasus, but as long as it continues to provide Armenians and Azerbaijanis with increasingly more effective means of killing each other, it encourages the contrary. However, reversing that trend would involve ceding some of Russia’s influence over the region and valuable defense contracts—something the Kremlin would be loath to do.