A man climbed onto the wing of an airplane preparing to take off from Nigeria's largest city Friday, sparking panic among passengers inside the aircraft, authorities said.

An Azman Air pilot spotted the man walking toward the moving aircraft at the Murtala Mohammed Airport in Lagos. As a precaution, the pilot slowed down and turned off the engines.

The intruder continued to wander around the plane before jumping on the wing and trying to get into the cabin, the airline said in a news release. The pilot reported the incident to the tower and the man was arrested.

A video of the incident taken from inside the plane shows the man climbing on the wing as passengers cry out in disbelief.

CLICK HERE TO GET THE FOX NEWS APP

The plane taxied back to the gate and passengers disembarked for a security check, the Federal Airport Authority of Nigeria said. The aircraft eventually departed for Port Harcourt, Nigeria.

The man was taken into custody by authorities. It was not clear how he was able to reach the plane or what his intention was.

Friday's incident was only the latest Nigerian airport security breach. In 2017, passengers on a private jet in Lagos said thieves forced open the cargo door and stole luggage.