As Russian troops press ahead with a grinding campaign to seize eastern Ukraine, the nation’s ability to resist the onslaught depends more than ever on help from the United States and its allies — including a stealthy network of commandos and spies rushing to provide weapons, intelligence and training, according to U.S. and European officials.

Much of this work happens outside Ukraine, at bases in Germany, France and Britain, for example. But even as the Biden administration has declared it will not deploy U.S. troops to Ukraine, some CIA personnel have continued to operate in the country secretly, mostly in the capital, Kyiv, directing much of the massive amounts of intelligence the United States is sharing with Ukrainian forces, according to current and former officials.

At the same time, a few dozen commandos from other NATO countries, including Britain, France, Canada and Lithuania, also have been working inside Ukraine. The United States withdrew its own 150 military instructors before the war began in February, but commandos from these allies either remained or have gone in and out of the country since then, training and advising Ukrainian troops and providing an on-the-ground conduit for weapons and other aid, three U.S. officials said.