South American presidents reached a testy compromise Friday to resolve a dangerous crisis triggered by a Colombian military attack in Ecuador, stepping back from a week of insults, troop movements and talk of war. After an emotional debate followed on live television throughout Latin America, the presidents of Colombia, Venezuela and Ecuador offered one another stiff handshakes and joined other Latin American presidents in approving a declaration resolving to work for a peaceful end to the crisis. The statement notes that Colombian President Alvaro Uribe apologized for the March 1 raid that killed 25 people including a senior rebel commander, and that he pledged not to violate another nation's sovereignty again. But it also committed all the countries to fight threats to national stability from "irregular or criminal groups," a reference to Colombia's accusation that its two neighbors have ties to Colombian rebels. "With the commitment to never again attack a brother country and the request for forgiveness, we can consider this grave incident as over," Ecuador's president Rafael Correa he said. The leaders immediately began to reverse their steps toward conflict, with Colombia withdrawing "genocide" allegations against Chavez, and Chavez pledging to increase trade between the two countries.