A passenger on an American Airlines flight opened the emergency door and jumped out to walk along the wing as the plane was reaching the terminal at Miami International Airport, according to officials.

The incident happened Wednesday night on an American Airlines flight from Cali, Colombia, to Miami.

“A passenger opened the over-wing emergency exit and jumped onto the ramp. The customer was immediately detained by law enforcement officials. All other customers deplaned normally. We thank our team members for their professionalism and apologize to our customers for the inconvenience,” American Airlines said in a statement.

The man was arrested and detained by U.S. Customs and Border Protection, according to Miami-Dade Police Department.

A local news station in Miami obtained a video of the man standing on the wing at the terminal before being arrested.

The Washington Post reported that the man required medical attention when he was taken to a correction center. He was at a Miami hospital emergency room, as of early Thursday.

The man has not been identified by police and his medical condition has been specified.

Opening an airplane's emergency exit door during a non-emergency can mean prison time and a heavy fine. Interfering with flight crew members and attendants carries a maximum penalty of 20 years in federal prison.