A medieval-style brawl between Chinese and Indian soldiers on their border in Ladakh this month turned a usually bloodless dispute into a potential cause for war between the world's two most populous countries.

The brawl lasted six hours and killed 20 Indian soldiers. Chinese officials have not said how many of their soldiers were killed or wounded but have admitted to losing “less than 20” troops after India reportedly handed over 16 bodies.

The clash is the biggest development in a standoff that began in early May and was the first time since 1975 that the two nuclear-armed nations shed blood over their decades-long border dispute.

Related: India, China troops clash at Himalayan border with 'casualties on both sides'

Both sides are working to ease tensions in the region, but the days since, both have deployed hundreds of thousands of soldiers. India and China have also moved advanced air assets to forward operating bases in the region and begun building new fortifications.

China photo

China and India today are giants. The two countries together account for about 37% of the world's population and are the second- and fifth-largest economies, respectively. They are also the second- and third-largest spenders on defense and are ranked fourth and fifth on the Global Firepower Index, which ranks potential military strength.

China and India also have the two largest active-duty armies, China with about 2.1 million active servicemen and India with roughly 1.4 million.

China has a technological advantage

On the whole, China's People's Liberation Army (PLA) is widely seen as more technologically advanced than India's military.

In China's arsenal are stealth fighters, a larger number of nuclear submarines, more military satellites, and a wider array of modern vehicles and small arms.

Some of those weapon systems were built with places like the Himalayas in mind, such as the Type 15 light tank and a new 155 mm vehicle-mounted howitzer; both were recently featured in televised drills in Tibet.

This technology gap “owes primarily to the fact that the Chinese have invested more resources into modernizing their military for a long time at a sustained and high level,” Timothy Heath, a senior international and defense researcher at the Rand Corporation, told Insider.

China photo

The PLA has gone through a massive modernization and restructuring effort since the 1990s, which has been one of the biggest priorities for its leaders, especially President Xi Jinping.

China has also shifted from buying advanced equipment from foreign suppliers to being able to produce its own domestic designs.

Related: The Chinese Military Has Black Hawks Thanks To Capitalism

Conversely, India has had to rely on foreign suppliers for advanced equipment, and its domestic industries have not been able to produce the type of equipment in the numbers needed to rival China.

Until recently, India had not been able to invest the amount of money in defense that countries like China, Russia, and the US do because of its smaller economy. India also needs to send resources to address more immediate threats.

“Part of the issue with India is that their security problem is much more fragmented,” Heath said, noting India's long-time fight with insurgents and the constant challenge from Pakistan.

China photo

The technology gap is smaller in the Himalayas

But none of this means that the outcome is preordained. While the PLA has more advanced equipment, most of its best assets and units are focused in eastern and southern China, poised to face off against the US, Japan, or Taiwan.

A war with India would be fought largely in the tough, mountainous terrain of the Himalayas, landscape that is radically different from what most of the PLA is trained to deal with. Moreover, India's military is a capable and well-equipped force.

China photo

In particular, the Indian Air Force's (IAF) Su-30MKI all-weather multirole air-superiority fighter is regarded as superior to the Chinese J-8, J-11, and Su-27 fighters stationed in the region.

The IAF also has a number of US-made Apache attack helicopters and Chinook heavy-lift helicopters already deployed, and unlike the Chinese pilots, they have more dedicated experience flying in the region's very difficult conditions.

Further, India has more advanced air assets already in the region and closer to potential conflict zones, whereas China's air bases are fewer and further inland.

India is also expecting its order of S-400 air-defense systems from Russia this fall. This will free up more IAF aircraft for ground-attack roles.

India's army is modernizing

India's army is going through a modernization process. It's replacing its domestically made INSAS rifle and AK-47s with the modern AK-203 and SIG 716 assault rifles. It is also replacing the World War II-era Sterling submachine gun with Caracal CAR 816s and for the first time introducing dedicated sniper rifles like the Barret M95 and Scorpio TGT.

China photo

In February, the army signed a contract for six US-made Apache helicopter gunships and is expected to soon order a number of Indian-made HAL light combat helicopters, which are designed to operate in the Himalayas.

When it comes to armor, India's T-90 and T-72 tanks should also be worthy adversaries to China's Type 99 and Type 96 tanks.

India also has the Brahmos ram-jet supersonic cruise missile. Developed in a joint venture between India and Russia, it is capable of reaching Mach 3, making it one of the fastest missiles in the world. It can be launched from ground and naval launchers and was recently approved for use by the Indian Air Force.

Experience is a factor

The Indian army also has an edge in experience. India has fought numerous wars with Pakistan, most recently the Kargil War in 1999. It has also fought decades-long insurgencies in Jammu and Kashmir and was involved in the Sri Lankan Civil War.

One Chinese analyst acknowledged that India is “the world's largest and experienced country with plateau and mountain troops.”

China photo

Conversely, China has not fought a major war with anyone since its brief war with Vietnam in 1979 and has used UN peacekeeping missions as a way for its troops to gain experience.

However, as Heath points out, “combat experience does not automatically translate into military advantage.”

In particular, the Chinese “are in a better position to concentrate and mass force than the Indians,” Heath says. “It doesn't matter how good and experienced your troops are if you're outnumbered 10 to one.”

Moreover, China's ability to move forces means it may be able to quickly redeploy some of its best equipment and assets, like stealth fighters and ballistic-missile systems.

A naval confrontation

While China and India don't share a maritime border, they both have vested interests in the Indian Ocean, particularly in the Strait of Malacca, the shipping channel that connects the Indian and Pacific oceans.

The vast majority of China's oil imports flow through that strait, as does a large percentage of global trade.

China photo

China is keenly aware of its importance and is determined strengthen its presence in the Indian Ocean. China has established a naval base in Djibouti, may be building another in Pakistan, and controls a port in Sri Lanka.

The People's Liberation Army Navy (PLAN) has benefited greatly from investment and reforms. It is now one of the largest and strongest navies in the world and has advanced vessels like nuclear-powered ballistic-missile submarines, guided-missile frigates and destroyers, and two aircraft carriers with more on the way.

India too has advanced naval assets and plans to build more. It currently has one active aircraft carrier with another expected to start sea trials next year and has a number of advanced frigates and submarines, including two nuclear ones.

Related: A Foreign Navy Screwed Up Its New $3 Billion Nuclear Missile Sub By Leaving Its Hatch Open

But the Indian Navy is still outclassed. China's Southern Theater Command alone has more diesel-electric attack submarines and guided-missile frigates than the entire Indian fleet.

However, India has the same advantage that China enjoys in the East China Sea: proximity to its mainland. Any fight with the PLAN would likely be in India's backyard, which means it can use land-based aircraft and coastal defenses against PLAN ships.

Ballistic and nuclear missiles

China photo

The biggest fear, of course, is that any conflict between China and India will turn nuclear. The Stockholm International Peace Research Institute estimates that China has 320 nuclear warheads while India has 150.

Though China has more advanced delivery systems and warheads, the proximity of the two countries means that even conventional missiles and aircraft could still deliver massive destruction to Chinese and Indian cities.

However, most observers don't believe that a conflict stemming from current border disputes will lead to nuclear war. Both countries have a “no first use” policy, meaning they will only use nuclear weapons in response to a nuclear attack.

The mass use of ballistic missiles also runs the risk of unintended escalation and prolonging conflict, as they would likely only create stretches of no man's land.

The disputes in question may not be seen as worth such destruction. As Heath put it: “risking such massive losses over a barren and desolate stretch of land up in the mountains — it's hard to see how that would be justified.”

Any war between China and India, then, will most likely see troops attempting to take and hold land in the harsh Himalayas, where air support will be limited, and Indian efforts to fend Chinese ships off of its mainland.

More from Business Insider: