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

People wait inside the Munich Airport in Munich, Germany, Tuesday, Aug. 27, 2019. Munich Airport says it has closed some of its terminals because a person has likely entered the "clean area" through an emergency exit door. The international airport tweeted Tuesday morning that terminal 2 and areas B and C or terminal 1 had been closed for police operations.(AP Photo/Matthias Schrader)

People wait inside the Munich Airport in Munich, Germany, Tuesday, Aug. 27, 2019. Munich Airport says it has closed some of its terminals because a person has likely entered the "clean area" through an emergency exit door. The international airport tweeted Tuesday morning that terminal 2 and areas B and C or terminal 1 had been closed for police operations.(AP Photo/Matthias Schrader)

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.