( AP )- South America moved away from talk of war as the presidents of Colombia, Venezuela and Ecuador agreed to end a bitter dispute triggered by a Colombian cross-border raid with testy handshakes and an apology.
After intense regional diplomacy and emotional debate, Latin American leaders Friday approved a declaration resolving to work for a peaceful end to the crisis, which saw Venezuela and Ecuador send troops to their borders and Colombia accuse its neighbors of backing leftist rebels seeking to topple its government.
The leaders at the summit in the Dominican Republic wasted little time in reversing their steps toward conflict.
Colombia pledged not to follow through on its threat to seek genocide charges against Venezuelan President Hugo Chavez at an international court for allegedly supporting the Revolutionary Armed Forces of Colombia, or FARC, which finances its insurgency through kidnapping and the cocaine trade.
Nicaragua said it would restore diplomatic relations with Colombia, broken off only the day before. Chavez said trade with Colombia should "keep increasing," two days after saying he didn't want even "a grain of rice" from his neighbor.
"We're going to begin to de-escalate," Chavez said. "Hopefully this compromise will be honored so this never happens again."
The statement approved by the presidents notes that Colombian President Alvaro Uribe apologized for the March 1 raid inside Ecuadorean territory that killed 25 people including a senior rebel commander, and that he pledged not to violate another nation's sovereignty again.
But it also commits 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 rebels.
The agreement didn't eliminate the causes of the crisis: a Colombian insurgency that has spilled across its borders, and a stalemate over international efforts to facilitate a swap of rebel-held hostages for imprisoned guerrillas.
The agreement came after a spirited debate followed on live television throughout Latin America. The atmosphere became so bitter that at one point Ecuadorean President Rafael Correa walked out for what an aide said was a bathroom break. He quickly returned and called Uribe a liar.
But in the end, even Correa seemed satisfied and stiffly shook Uribe's hand.
"With the commitment to never again attack a brother country and the request for forgiveness, we can consider this grave incident as over," Correa said.
On Saturday, Correa warned that his government would not immediately re-establish diplomatic relations with Colombia. Correa said on his weekly radio show that it will be "difficult to recover trust" in Uribe's government. Restoring diplomatic ties "will take a little time," he said.
The summit showdown underscored Latin America's swerve to the left in recent years - and the increasing isolation of Colombia's center-right government, Washington's strongest ally in Latin America. The United States was the only country in the Americas to offer Colombia unqualified support in the dispute.
Correa, Chavez and Nicaragua's Daniel Ortega, all leftists aligned against Washington, were the most strident in confronting Uribe , but even more centrist leaders from Argentina, Brazil and Chile lectured him.
The day's loudest applause came when Correa made a final appeal to Uribe to respect their border, saying otherwise no nation can be safe.
Uribe said his military was forced to act because Colombia's neighbors have provided refuge to the FARC. And he said the rebels responded by doing favors for Chavez and helping Correa get elected.
Uribe held up documents he said were from the laptop of Raul Reyes, the rebel leader killed in the attack. He said one message to the guerrillas' top commander told of "aid delivered to Rafael Correa, as instructed." Colombia promised to turn over the evidence to Ecuador for investigation.
Correa described Ecuador as a victim of Colombia's conflict, and proposed an international peacekeeping force to guard their border - an idea not included in the summit declaration.
Chavez, for his part, denied Uribe's accusation that he had given some $300 million to the rebels. He also said he never sent them weapons.
"I have never done it and will never do it," Chavez said. "I could have sent a lot of rifles to the FARC. I will never do it because I want peace."