Ukraine is consolidating its gains, but Russia is shoring up its defensive lines, a Pentagon spokesman said.

WASHINGTON — Ukrainian forces continue to shore up their gains after a lightning counteroffensive against Russian troops in the northern Kharkiv region, the Pentagon’s chief spokesman said Friday.

Ukraine recaptured roughly 1,000 square miles around Kharkiv in a matter of days as Russian forces withdrew to avoid encirclement and isolation, especially near Izium, a strategically important railway hub. Ukrainian forces have also made more modest advances in recent weeks in the southern Kherson region.

“In the north what we assess is that the Ukrainians are consolidating their gains after taking back significant territory, and that the Russians are attempting to shore up their defensive lines after having been pushed back,” the spokesman, Brig. Gen. Patrick S. Ryder, told reporters at the Pentagon.

“In the south, the Ukrainians continue to make what we would assess as deliberate, calculated forward movement as the Russians continue to try to hold that line,” he said.