I had my passport stolen in Malaga, Spain. The ship (Shadow) was leaving that night for Morocco, so the captain kicked me off the ship as I was about to become an illegal alien as we changed International location. I had to catch a train to Madrid (closest American Embassy) and get a replacement passport and then catch another train to pick the ship back up in Valencia a few days later.
I'd never been to Madrid, so that was a thing. The finance officer on the Shadow was the "troubleshooter" for the ship, and he maintained contact with me throughout my "land trip." He made reservations at a hotel near the American embassy and made sure that I could check in without a passport. !! It took me less than 4 hours to get the replacement passport, so one night in Madrid and the next morning I got my new passport and headed for Valencia.
It was kind of a pain to deal with losing a passport, but it wasn't the end of the world. It took (except for travel time) less than a day to replace my passport. The time in the embassy was quick and simple.