A man returning from vacation in Thailand inadvertently wandered through the wrong door at Munich Airport on Tuesday, triggering a massive security alert and forcing the partial shutdown of the airport for several hours and the cancellation of nearly 200 flights.

Authorities said the man had briefly left a passenger area to use a restroom and became confused when he returned and all the other passengers were gone, the publication El País reported.

The man then attempted to find his connecting flight back to Madrid. He allegedly pushed a button that opened emergency doors that led to a restricted area reserved for passengers who’d already been cleared by security, Bavarian news outlet BR24 and local newspaper Merkur reported. The man’s action triggered an alert that forced the partial evacuation of two of the airport’s terminals.

As many as 5,000 passengers were affected by the shutdown, which lasted four hours. Munich Airport is one of Germany’s busiest aviation hubs — and is especially crowded during the peak summer travel season.

Police did not identify the man but said he is from Spain and in his 20s. He was detained and questioned by police, who said he was “horrified” by his mistake. They said he is unlikely to face consequences because the incident was a mistake, the Associated Press reported.