The drones began crashing on Ukraine’s front lines, with little explanation.

For months, the aerial vehicles supplied by Quantum Systems, a German technology firm, had worked smoothly for Ukraine’s military, swooping through the air to spot enemy tanks and troops in the country’s war against Russia. Then late last year, the machines abruptly started falling from the sky as they returned from missions.

“It was this mystery,” said Sven Kruck, a Quantum executive who received a stern letter from Ukraine’s Ministry of Defense demanding a fix.

Quantum’s engineers soon homed in on the issue: Russians were jamming the wireless signals that connected the drones to the satellites they relied on for navigation, leading the machines to lose their way and plummet to earth. To adjust, Quantum developed artificial intelligence-powered software to act as a kind of secondary pilot and added a manual option so the drones could be landed with an Xbox controller. The company also built a service center to monitor Russia’s electronic attacks.

“All we could do is get information from the operators, try to find out what wasn’t working, test and try again,” Mr. Kruck said.

A battle is raging in Ukraine in the invisible realm of electromagnetic waves, with radio signals being used to overwhelm communication links to drones and troops, locate targets and trick guided weapons. Known as electronic warfare, the tactics have turned into a cat-and-mouse game between Russia and Ukraine, quietly driving momentum swings in the 21-month old conflict and forcing engineers to adapt.

“Electronic warfare has impacted the fighting in Ukraine as much as weather and terrain,” said Bryan Clark, a senior fellow at the Hudson Institute, a think tank in Washington, adding that every operation in the conflict now has to take into account enemy moves in the electromagnetic spectrum.

Electronic warfare has been a feature of wars for more than 100 years. During World War II, the British mimicked German radio signals to deceive targeting systems that bombers used, which Winston Churchill popularized as the “battle of the beams.” In the Cold War, the Soviet Union invested heavily in electronic weapons to gain an asymmetric advantage against the missiles and planes from the United States.

In recent decades, the use of electronic attack and defense has been more lopsided. In the Iraq war in the 2000s, the United States used gadgets called jammers to create so much radio noise that improvised explosive devices could not communicate with their remote detonators. More recently, Israel has jumbled GPS signals in its airspace with electronic warfare systems to confuse would-be attacks from drones or missiles.

The war in Ukraine is the first recent conflict between two large and relatively advanced armies to widely deploy electronic warfare abilities and evolve the techniques in real time. Once the purview of trained experts, the technologies have spread to frontline infantry troops. Ukrainian drone pilots said they constantly fine-tuned their methods to parry the invisible attacks. One day, a new radio frequency might work, some said. The next, a different antenna.

The tactics have become so critical that electronic warfare received its own section in a recent essay by Gen. Valery Zaluzhny, Ukraine’s top military commander. “Widespread use of information technology in military affairs” would be key to breaking what has become a stalemate in the conflict with Russia, he wrote.

The techniques have turned the war into a proxy laboratory that the United States, Europe and China have followed closely for what may sway a future conflict, experts said.

Gen. Charles Q. Brown Jr., the chairman of the Joint Chiefs of Staff, raised the topic of electronic warfare this year in prepared remarks for a Congressional hearing. NATO countries have expanded programs to buy and develop electronic weapons, said Thomas Withington, an electronic warfare expert at the Royal United Services Institute, a British security think tank.

“The war in Ukraine has been the performance enhancing drug for NATO’s electromagnetic thinking,” he said. “It has been the thing that concentrates minds.”

As Russian tanks rolled toward Kyiv in February 2022, the Russian military initially made good on its reputation as one of the world’s best at electronic warfare. It used powerful jammers and decoy missiles to inundate Ukrainian air defenses, leaving Ukraine reliant on aircraft to fight off Russian planes.

The electronic weapons do not appear dangerous at first glance. They are typically satellite dishes or antennas that can be mounted on trucks or set up in fields or on buildings. But they then beam out electromagnetic waves to track, trick and block sensors and communication links that guide precision weapons and allow for radio communications. Just about every communications technology relies on electromagnetic signals, be it soldiers with radios, drones connecting to pilots or missiles linked to satellites.

One basic but effective tool is a jammer, which disrupts communications by sending out powerful signals at the same frequencies used by walkie-talkies or drones to cause so much disturbance that beaming a signal is impossible. Jamming is akin to blasting heavy metal in the middle of a college lecture.

Another key weapon sends a signal that pretends to be something it is not, like a satellite link. Called spoofing, the fake signal can convince a drone or missile it is miles off course by feeding it false coordinates. In other cases, spoofers ape the signals made by missiles or planes to trick air defense systems into detecting attacks that aren’t happening.

Other tools listen for beams of radiation and seek to locate their origin. These devices are often used to find and attack drone pilots.

After early success using these tools, the Russian military stumbled, analysts said. But as the war has stretched on, Russia has innovated by making smaller, mobile electronic weapons, like anti-drone guns and tiny jammers that form a radio-wave bubble around trenches.

“The Russians have been more nimble at responding than we would have expected from their ground behavior,” said James A. Lewis, a former U.S. official who writes on technology and security for the Center for Strategic and International Studies in Washington. “That should be worrisome for NATO.”

The Kremlin did not respond to a request for comment.

To combat Russia’s century of Soviet know-how in electronic attack and defense, Ukraine has turned to a start-up approach associated with Silicon Valley. The idea is to help the country’s tech workers quickly turn out electronic warfare products, test them and then send them to the battlefield.

This summer, Ukraine’s government hosted a hackathon for firms to work on ways to jam Iranian Shahed drones, which are long-range unmanned aerial vehicles that have been used to hit cities deep inside the country, said Mykhailo Fedorov, Ukraine’s digital minister.

At testing ranges outside Kyiv, drone makers pit their craft against electronic attack weapons. In a field in central Ukraine in August, Yurii Momot, 53, a former Soviet Union special forces commander and a founder of the electronic warfare firm Piranha, showed a new anti-drone gun built for the conflict.

The guns have a checkered performance in the war, but Mr. Momot’s version worked. Pointing it at a DJI Mavic, a common cheap reconnaissance drone, he pulled the trigger. The drone hovered motionless. Its navigation system had been swamped by a burst of radio signals from the gun.

“The whole system is more structured in Russia,” Mr. Momot said of Russia’s electronic warfare program, which he knows from his time with the Soviet army. “We’re catching up, but it will take a while.”

Other Ukrainian companies, such as Kvertus and Himera, are building tiny jammers or $100 walkie-talkies that can withstand Russian jamming.

At Infozahyst, one of Ukraine’s biggest electronic warfare contractors, engineers recently worked on a project to track and identify Russian air defense systems. Iaroslav Kalinin, the company’s chief executive, said Russia’s anti-aircraft radars were not as easy to replace as tanks. But if enough were eliminated, it could provide a turning point in the war.

“Once we control the sky, then Russia fails hard,” he said.

This summer, Oleksandr Berezhny, a Quantum executive, traveled with one of Ukraine’s top drone pilots to share what they knew about electronic warfare with NATO. At a large round table in a base in Germany, they explained the problems they faced to a rapt audience of commanders.

“We told them probably 90 percent of the American and European systems coming to Ukraine were not prepared to meet the electronic warfare challenge,” Mr. Berezhny said. “There was total understanding that something needed to change.”

As Ukraine offers a glimpse of how future electronic battles may be waged, would-be combatants of those fights have taken note. The United States and Europe have paid close attention to how such weapons have fared against Russian systems, with some worrying they are not responding fast enough. Chinese experts have also exhaustively chronicled which Russian electronic attacks were most effective against NATO systems, and in turn, where Russia failed.

In one November 2022 report, a Chinese defense think tank detailed how a Russian electronic attack had tricked NATO’s detection equipment, leading Ukraine to reveal the location of its own electronic defenses.

“The Russian army’s anti-drone combat capabilities are superior to those of the U.S. military,” the report said.

As Ukraine evolves its anti-jamming techniques, some of those tactics are flowing to the United States and its allies, said Mr. Clark of the Hudson Institute.

“Now you’re starting to see countries, including the United States, field these smaller systems, just like you’re seeing folks in Ukraine cobbling them together,” he said.

For many on Ukraine’s front, the improvements can’t come fast enough.

“Even if you make your drone invisible, your controller and your antenna give out a signal,” said one Ukrainian drone pilot, who gave only his first name, Vladislav. Russians can detect a window of about 200 square meters where a drone pilot might be, he added, noting that artillery had once come within “about 15 to 20 meters” of hitting him.

“It’s not possible to hide completely,” he said.

Olha Kotiuzhanska contributed reporting from Kyiv, Dnipro and Odesa, Ukraine. Arijeta Lajka contributed video production from New York.