Ukrainian troops are probing Russian defenses as spring gives way to a second summer of fighting, and Kyiv’s forces are facing an enemy that has made mistakes and suffered setbacks in the 15-month-old war. But analysts say Moscow also has learned from those blunders and improved its weapons and skills.

Russia has built heavily fortified defenses along the 1,000-kilometer (600-mile) front line, honed its electronic weapons to reduce Ukraine’s edge in combat drones, and turned heavy bombs from its massive Cold-War-era arsenal into precision-guided gliding munitions capable of striking targets without putting its warplanes at risk.

The changing Russian tactics along with increased troop numbers and improved weaponry could make it challenging for Ukraine to score any kind of quick decisive victory, threatening to turn it into a long battle of attrition.

U.S. Joint Chiefs chairman Gen. Mark Milley said in an interview with The Associated Press on Tuesday that while Ukraine’s military is well-prepared, as time goes on, “this will be a back-and-forth fight for a considerable length of time.”

Most attention last week focused on catastrophic flooding in southern Ukraine caused by the destruction of the Kakhovka dam that both sides blame on each other.

At the same time, however, Ukrainian troops have unleashed a series of attacks in several parts of the front that so far have made only marginal gains against multilayered Russian defenses.

Ukrainian President Volodymyr Zelenskyy said Saturday that counteroffensive and defensive actions are underway against Russian forces, asserting that his commanders are in a “positive” mindset about its success. Ukrainian authorities have stopped short of announcing the start of a full-blown counteroffensive.

A day earlier, Russian President Vladimir Putin said that it had begun, but that Ukraine failed to make any headway and suffered “significant” losses.

Sir Richard Barrons, a retired general who led the U.K. Joint Forces Command, said the Russian military has built “textbook” defensive lines and adjusted its tactics following its hasty retreat from wide swaths of the Kharkiv and Kherson regions last fall under the brunt of a swift Ukrainian campaign.

He pointed at the improved Russian ability to both counter and use drones and also noted that Moscow has learned to keep key assets like command headquarters and ammunition dumps out of artillery range.

“And they have sharpened up how they can fire at Ukrainian artillery and tanks when they spot them,” he told AP. “So if you add all that together, everybody knows this will be a harder fight than for Kherson or Kharkiv in the autumn of last year.

“People are still using those two successes, and they were successes, as benchmarks, which I think is unfair, unreasonable in the circumstances,” he said.

Russia has fielded more troops to protect the long front line, even though many of them could be poorly trained, he said.

At the start of the war, Russian military convoys stretched for miles to become easy prey for Ukrainian artillery and drones during a failed attempt to capture Kyiv, in what was seen as a major blunder.

Ukrainian missiles then sank the Russian cruiser Moskva, the flagship of its Black Sea Fleet, in a major blow to Moscow’s pride; Kyiv’s rockets pummeled Russian ammunition depots and command headquarters; and Kremlin forces hastily pulled back from large areas in the east and the south in the fall.

Despite those setbacks, Russia dug in to defend broad parts of Ukrainian territory it captured early in the invasion. Last month, it claimed control of the eastern city of Bakhmut after the war’s longest and bloodiest battle.

Fundamental Russian weaknesses remain.

Russian troops continue to suffer from low morale, there are shortages of ammunition, and coordination between units has remained poor. Vicious infighting has erupted between the military brass and the Wagner private military contractor, which has fielded tens of thousands of mercenaries to the battlefield to spearhead the battle for Bakhmut.

A major factor still limiting Russia’s capability has been its decision to keep its air force from forging deep into Ukraine after it suffered heavy losses in the war’s initial stages. Its attempts to knock out Ukraine’s air defenses have failed. Thanks to supplies of Western weaponry, Ukraine now poses an even more formidable challenge to Russian aircraft.

Barrons emphasized it’s essential for military leaders in Kyiv to continue keeping its adversary’s warplanes at bay so that “the counteroffensive isn’t the moment the Russian air force suddenly finds its capability and courage and romps … all over Ukraine.”

Ukrainian military analyst Oleh Zhdanov notes that Moscow has maintained a numerical advantage in troops and weapons, despite any weaknesses.

While Russia has increasingly tapped its Cold-War arsenals, deploying tanks dating to the 1950s to replenish its massive, early losses, such old weapons can still perform well, Zhdanov said.

“It doesn’t matter what tanks they have; they have thousands of them,” Zhdanov told AP, noting Russia put many of them to use as stationary weapons in their defensive lines, including in the Zaporizhzhia region where they proved effective.

He acknowledged Russian success in hitting Ukrainian military depots. relying on Moscow’s agents and collaborators, but said such losses were “tolerable.” He also said the Russians increasingly use drones and improved electronic warfare to jam those from Ukraine.

Russia has stopped using battalion-sized tactical groups it deployed early in the war and shifted to smaller units, Zhdanov said.

While the Russian air force has operated in relatively small numbers, it has modernized its stock of bombs to turn them into gliding weapons that have proven efficient, he said. The 500-kilogram (1,100-pound) bombs adapted with a GPS module can inflict massive damage.

“The Soviet Union produced those bombs in uncountable numbers,” Zhdanov said, adding that the Russians drop up to 50 a day for a “major psychological effect.”

One such bomb accidentally released over the Russian city of Belgorod near the border with Ukraine in April blasted a huge crater and slightly injured one person.

Russian military bloggers hailed the punch of the gliding bombs and their ability to hit targets up to 70 kilometers (over 43 miles) away. One former military pilot said in his blog that work is under way to convert 1,500-kilogram (3,300-pound) bombs into gliding munitions.

These conversions allow the Russian air force to ramp up strikes on Ukrainian forces without risking its warplanes.

The Royal United Service Institute, a London-based think-tank that focuses on defense and security issues, listed these gliding bombs along with other improvements in Russian weapons and tactics.

“Although they only have limited accuracy, the size of these munitions poses a serious threat,” RUSI said in a recent report, adding Russia was working to improve their accuracy.

Russian engineers have shown prowess in building field fortifications and complex obstacles along the front line, including concrete-reinforced trenches and command bunkers, wire-entanglements, ditches, anti-tank hedgehogs or “dragon’s teeth” and complex minefields, the report said.

Extensive placement of sophisticated mines for use against tanks and infantry poses “a major tactical challenge to Ukrainian offensive operations,” the RUSI authors said.

Other Russian improvements noted in the report include better thermal camouflage for tanks; nimbler deployment of artillery into multiple positions, including integration with drones to avoid losses; and attacking Ukrainian artillery with loitering munitions — drones that hover until they acquire a target.

Such responsive Russian fire represents “the greatest challenge to Ukrainian offensive operations,” the RUSI report said.

Improved Russian electronic warfare systems have destroyed about 10,000 Ukrainian drones a month, while they also have been able to intercept and decrypt Ukrainian tactical communications in real time, it added.

They also have learned to intercept GPS-guided rockets fired by Western-supplied launchers like the U.S.-made HIMARS, which embarrassed the Russians and inflicted major damage, the report said.

Russia’s military “is able to improve and evolve its employment of key systems,” RUSI said, but noted it could struggle to respond to similar quick adjustments by Kyiv that could make Moscow’s units ”likely to rapidly lose their coordination.”

___

Associated Press writers Danica Kirka in London, Tara Copp in Normandy, France, and Yuras Karmanau in Tallinn, Estonia, contributed.

___

Follow AP coverage of the war in Ukraine at https://apnews.com/hub/russia-ukraine-war

This article first appeared on APnews.com