For months Russian and Ukrainian soldiers have waged a brutal war across a 1,500-mile (2,400-kilometer) front line, inflicting casualties, fighting to the point of exhaustion and making slow gains in territory when they were not suffering costly setbacks.

After beginning with the Russian seizure of part of southern Ukraine and a failed strike at the capital, Kyiv, and then pivoting to a bloody artillery battle in the country’s east, the war is entering a third chapter. A battlefield stalemate prevails, with hostilities at a simmer, amid anxious uncertainty over whether — and when — Ukraine will launch a counteroffensive to try to break the deadlock.

The timing for any such attack has emerged as a pivotal strategic decision for Ukraine’s government. Both sides are preparing for a protracted war, but Ukraine has greater incentive to try to avoid it with potentially risky maneuvers as early as this fall — before the rainy season turns the countryside into impassable bogs, or energy shortages and soaring costs undermine European support.