If your flight to Europe is departing tonight and you can’t find your passport, here’s what to do.

I was leaving the next day for Europe. I set my passport on top of my tote bag—at least I think I did. Next time I looked, it wasn’t there. After an hour of searching, I had to admit it was lost.

With an average processing time of two months for a new passport, did that mean my trip was over before it had begun? Good-bye prepaid hotels and tours? Fortunately, no. I was able to get a replacement passport within three hours. Here’s how I did it:

1. I found the closest Passport Agency. Fortunately there was one in my city. Not near an agency? Check whether there’s a Passport Acceptance Facility nearby. If there isn’t, call the National Passport Information Center to find out about other alternatives. I don’t recommend going to one of those “passport-expediting” companies. They’ll most likely go through a passport agency, anyway. By going straight to the source, you’re both skipping a step (less delay!) and saving money.

2. I gathered written proof of my imminent travel plans, photo ID, and citizenship. Before you can make an appointment, most (though not all) agencies will require evidence that either your trip is scheduled within two weeks or you need to submit your passport for a visa within twenty-eight days. I brought my driver’s license along with copies of my birth certificate, missing passport, and airline reservation.

3. I called to make an appointment. At some agency offices, you can also just walk in during certain hours, but be ready to take a number and wait in line.

4. On the way to my appointment I stopped at Kinko’s to have passport photos taken.

5. Once at the Passport Agency, I filled out form DS-11 for a new passport.

6. I paid the standard $110 application fee, plus a $60 expediting-at-agency fee and a $35 execution fee (total: $205), by credit card.

7. I got ready to wait. It takes around three to five hours to actually make a passport. You can either sit tight at the agency, or leave and come back—they will give you an estimated window of time they’re expecting your passport to be ready.

8. Pick up your passport and go home…where, if you are like me, you will discover your previously lost (and now void) passport had slipped through a tear in the lining of your bag.

Twist’s Take: If your passport goes missing right before your trip, there’s a decent chance you can replace it in time.