BUENAVENTURA, Colombia — After more than two years of peace talks, the finish line seemed to be getting closer.

In the last few months, the rebels had declared a unilateral cease-fire, pledging to stop carrying out attacks, and had promised to stop recruiting child fighters. The two sides had even agreed to work together to find and destroy the thousands of land mines littering Colombia after five decades of war.

But suddenly, that progress suffered a major setback when at least 10 soldiers were killed late Tuesday night in what the government said was an attack by the Revolutionary Armed Forces of Colombia, or FARC.

The clash occurred in a hamlet in western Colombia called La Esperanza, or Hope.

President Juan Manuel Santos called it a “deliberate attack” by the FARC and said the military could resume bombing guerrilla encampments, lifting a ban he imposed in March for the sake of the peace talks and extended just last week.