Colombians have been crossing the border on foot since the main crossings were closed on 19 August
President Nicolas Maduro of Venezuela and his Colombian counterpart, Juan Manuel Santos, have agreed to gradually reopen their common border.
Venezuela closed the border a month ago and launched a major anti-smuggling operation.
Mr Maduro says smuggling has led to shortages in parts of Venezuela.
Meeting in Ecuador, the two presidents also said they would return ambassadors to each other’s capitals immediately.
Some 20,000 Colombians have left Venezuela since the crisis began.
More than 1,500 of them were evicted due to alleged connections with criminal gangs operating in the area.
Most of the others fled in fear, many carrying their personal belongings over the border rivers.
“Common sense, dialogue and peace between our peoples and our countries have triumphed today,” said Mr Maduro after the talks in Quito.
For his part, Mr Santos said Venezuela “should have respected the rights of Colombians” who had to leave the country and return over the border.
The Colombian leader added: “I agree that criminal organizations working in the border area is a big problem, but the best way to deal with it is by working together.”
Most crossings were closed and some 3,000 Venezuelan troops have been deployed along the border since Mr Maduro launched a major anti-smuggling operation 19 August.
For many years, heavily subsidised items from Venezuela, including cheap petrol, have been sold at huge profit over the border in Colombia.
Mr Maduro says smuggling has led to shortages in the west of Venezuela and other parts of the country.
Monday’s talks were facilitated by Uruguayan President Tabare Vasquez and his Ecuadorean counterpart, Rafael Correa.
The summit was preceded by two meetings between the Colombian and the Venezuelan foreign ministers.