A guard at a boarder may process your passport to leave the country you have been in to continue on to the country you are entering.