Ukrainian military officials said on Tuesday that national guard units had begun an offensive against rebel positions near Mariupol. A spokesman for one volunteer unit, the Azov Battalion, claimed that it had captured the small towns of Shirokino and Pavlopol just outside the city.

The fighting continued around Debaltseve as well, with the rebels claiming that they had surrounded the city while the Ukrainian Army insisted that the battle was not over. In a new wrinkle, artillery shells fell 50 miles to the north at Kramatorsk, which had not seen any fighting in months but where the government has a sizable military base.

Mariupol is a bustling port in a strategic location on the Sea of Azov, near the Russian border. The rebels control the territory to the north and east, and Russia controls the Crimean Peninsula to the southwest. Mariupol is the only major obstacle to their realizing a long-held goal of opening a land route between Russia and Crimea and taking complete control of the Sea of Azov and its rich industrial infrastructure. Russia, which denies playing any role in the conflict here, says it has no such intention.

Even so, Mariupol has been a target almost since the fighting began early last year. The rebels briefly took control of it in the spring, and it was the scene of fierce fighting in the late summer, when the rebels drove to within 10 miles of the city limits.

“In September, Mariupol was very weak and poorly defended,” said Andrey Dzyndzya, who was a prominent activist during the protests that toppled Ukraine’s previous, pro-Russia government and is now a fighter with the Azov Battalion. “There was a kind of panic in the city,” he recalled. “In September, we managed to stop them only by luck.”

But he and other local military and government leaders said the situation was different now, with a complete ring of defensive lines, rather than just positions on the main roads.