Border guards and passports as we conceive them didn't really exist until the 20th century. The historian Paul Fussell wrote in his book Abroad:
"[B]efore 1915 His Majesty's Government did not require a passport for departure, nor did any European state require one for admittance except the two notoriously backward and neurotic countries of Russia and the Ottoman Empire."
And it wasn't until 1945 that Americans were generally required to hold a passport to travel abroad during peacetime. [1]