A 747 jumbo jet preparing to land on runway 28L can be seen from the new air traffic control tower at SFO in San Francisco, Calif. on Wednesday, Oct. 28, 2015.

A 17-year-old boy opened an emergency exit door of a Boeing 737, stepped out onto the wing and jumped to the runway after the jumbo jet landed at San Francisco International Airport Tuesday afternoon, officials said.

It was not immediately clear why the boy on a flight that originated in Panama City pushed open the weighted emergency exit door of the Copa Airlines flight, officials said.

The boy had been seated in an emergency exit row on Flight 208, according to the airline. He opened the door and slid down the wing to the tarmac just minutes after landing around 2:30 p.m., while the plane was still taxiing on the runway.

A flight crew member closed the exit door and the plane was able to pull into its gate, where passengers filed out without further incident, the airline said.

After jumping off the aircraft, the teenager was first apprehended by a construction crew on the airfield then detained by San Francisco police, Doug Yakel, a spokesman for SFO, said in a statement. The boy was later transferred to the custody of federal investigators.