In a surprise move, China’s navy has apparently installed a prototype electromagnetic railgun on one of its warships, pulling ahead of the US Navy in the ongoing race to equip naval vessels with more powerful guns.

But it's possible that American naval planners are preparing an even greater surprise for Beijing when it comes to oceangoing firepower.

Photos began circulating around the internet earlier this week depicting a large, previously unseen type of cannon fitted to the forward deck of a Chinese navy Type 072 landing vessel, reportedly at a facility on the Yangtze River. Naval observers quickly identified the weapon as a likely electromagnetic railgun, a technologically advanced weapon that uses magnetic force rather than explosive gunpowder to propel projectiles.

A railgun could, in theory, accelerate a munition to seven times the speed of sound, allowing it to quickly hit targets more than 100 miles away—nearly an order of magnitude farther than current naval guns. Railguns could destroy ships at sea, troops on land, and even aircraft and missiles in mid-flight.

The US Office of Naval Research has been working on railguns since 2005. In 2012, the Navy began land-based testing of two prototype railguns. For 2018, Congress authorized nearly $2.5 billion for research and development related to electromagnetic guns and other advanced ship weapons. “We continue to make great technical progress,” Office of Naval Research program manager Tom Boucher told Breaking Defense, a trade publication, last May.

But the American sailing branch has yet to install a railgun on a ship, although there has been talk of adding railguns to the new _Zumwalt_-class stealth destroyers as early as the 2020. As Motherboard has reported, the _Zumwalt_s' own conventional guns currently lack ammunition.

The Chinese navy has been working on railguns for several years, now. In adding a prototype cannon to a ship before the US Navy did, the Chinese fleet is positioned to conduct realistic testing and deploy operational railguns before the American fleet does, potentially giving China a huge firepower advantage.

Of course, there's no guarantee the prototype gun will actually work. Railguns are enormous power-hogs. Indeed, it's possible the Chinese navy chose to install its prototype electromagnetic gun on a landing ship because such ships have large cargo holds and could easily accommodate the massive generators and cooling units that even a rudimentary railgun requires.

Adding a railgun to an existing destroyer or other front-line warship could require significant changes to the ships' layouts and power systems. The US Navy has been worrying about that problem for several years now. "What do we take off our existing destroyers, cruisers and other ships in order to get this incredible capability [on them]?” Vice Adm. William Hilarides asked in 2015.

Still, installing a prototype railgun to an actual ship is a step toward a solution to the power and space problem. And it's a step the Chinese navy has taken first. Hilarides said it could take a decade to refine railgun technology and begin adding the new weapons to ships. Now China has at least a small headstart.

But it's possible the US Navy will take a shortcut toward more powerful naval guns. In addition to developing railguns, the American fleet is working on so-called "hypervelocity munitions." These highly-streamlined artillery shells can fly three times the speed of sound when fired from a conventional cannon—twice as fast as today's standard shells.

The higher speed conveys greater range and accuracy. And perhaps more importantly, hypervelocity munitions are compatible with most of the US military's existing cannons, including thousands of Army howitzers and the gun aboard the Navy's roughly 80 destroyers and cruisers.

“We thought railguns were something we were really going to go after, but it turns out that powder guns firing the same hypervelocity projectiles gets you almost as much as you would get out of the electromagnetic railgun, but it’s something we can do much faster,” then-Deputy Secretary of Defense Robert Work said in 2016.

For now, the Pentagon is working on hypervelocity rounds in parallel with the railgun. If the US fleet decides to focus its efforts on the hypervelocity shells, it could quickly leapfrog past China’s in terms of overall at-sea firepower.