Authorities at Munich airport detained a passenger who left a terminal via an emergency exit instead of going through passport control, prompting a temporary partial shutdown of one of Germany's busiest airports Tuesday.

Police said the incident had been a mistake and the man is unlikely to face any consequences.

Up to 5,000 passengers were affected by the disruption as federal police searched for the unnamed passenger, Munich Airport spokesman Robert Wilhelm said.

DELTA FLIGHT CARRYING NEARLY 200 DELAYED 18 HOURS AT NEW YORK'S JFK: REPORT

Terminal 1 and parts of Terminal 2 were closed during the police operation. They were re-opened a few hours later.

Some 190 incoming and outgoing flights were canceled, German news agency dpa reported.

Affected passengers, who had already been through security checks for their departing flights, had to go through the process again, Wilhelm said.

Munich airport is one of Germany's busiest aviation hubs and the shutdown came during peak summer travel season.

The passenger was identified by police as a Spanish man, between 20 and 25, who had flown in from Bangkok and was to catch a connecting flight to Madrid. Before boarding the connecting flight the passenger had to go through security controls, but instead opened an emergency door and left through it despite setting off an alarm.

CLICK HERE TO GET THE FOX NEWS APP

Last summer, some 330 flights were canceled in Munich when a woman entered a "clean area" of the airport without going through security checks, dpa reported.