SHYROKYNE, Ukraine — The trenches near this battered town in southeastern Ukraine slice surreally for miles across fields of sunflowers, in places running in three lines separated by a mile or two of mined ground, Ukrainian commanders say.

A feature not just of this bitterly contested ground, the trenches extend in varying degrees of completeness all the way to the northern limits of the line separating Ukraine from the separatist regions in the east. To some extent, they reflect a military necessity, with daily skirmishes along the barrier and occasional flare-ups, like one near Donetsk on Wednesday in which at least 21 people were killed.

There is a political subtext as well, a hardening of positions on both sides that is steadily undermining a peace accord signed in Minsk, Belarus, in February and that could lead to the next outbreak of war in the region, military experts and politicians here say.

Senior officials in Kiev, complaining about Russian violations of the agreement and knowing their army can never defeat the Russian-backed separatists militarily, have decided simply to cut off the eastern regions from the rest of the country.