Colombia and Venezuela have agreed to restore diplomatic dialogue and oversee progressive normalization of their border, after a meeting between Colombian President Juan Manuel Santos and his counterpart Nicolas Maduro.
The two countries have been locked in a border conflict for a month, after Maduro ordered the closure of part of the frontier, saying some of his military were attacked during an anti-smuggling operation by Colombian paramilitaries.
Ecuadoran President Rafael Correa, who hosted the talks in Quito, made the announcement in a joint statement that said Santos and Maduro had authorized the immediate return of their respective ambassadors.
It was the first meeting between Maduro and Santos since the crisis erupted on August 19.
The talks -- facilitated by Correa and Uruguayan President Tabare Vazquez -- lasted five hours and also saw an agreement that the two countries conduct an investigation of the situation on the border.
Afterwards, Maduro said: Common sense prevailed.
Santos described the talks as calm, respectful and productive.
Maduro had previously accused Colombia of waging an attack on Venezuela's economy, a reference to the rampant smuggling of heavily subsidized goods out of the oil-rich but shortage-hit socialist country.
The row also saw about 20,000 Colombians deported or flee Venezuela, prompting Bogota to accuse Caracas of violating its citizens' rights.