"The last Venezuelan soldier just left Colombian territory," Santos wrote on his official Twitter page on Thursday.
For several days, dozens of Venezuelan soldiers had been deployed at the camp where the Venezuelan flag was raised.
On Thursday, Santos discussed the issue with his Venezuelan counterpart Nicolas Maduro, who said that Venezuelans had made a mistake, assuming that the camp was located on Venezuelan territory.
The Venezuelan-Colombian border, stretching for over 1,300 miles, was closed by the order of Maduro in August 2015 amid crackdowns on migrants and smugglers. Santos and Maduro agreed to the gradual and controlled reopening of the common border in August 2016.