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 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 last week 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.”

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.

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 said. “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 land it took early in the invasion. Last month, it claimed control of the eastern city of Bakhmut after the war’s longest and bloodiest battle.

Still, 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 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,” he said, 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.” Zhdanov also said the Russians increasingly use drones and improved electronic warfare to jam those from Ukraine.

Russia has stopped using battalion-size 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 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.”

Russian military bloggers hailed the punch of the gliding bombs and their ability to hit targets more than 40 miles away. 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, tank obstacles and complex minefields, the report said.

Extensive placement of sophisticated land mines 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.