Samuel L Jackson tried to warn us.

Passengers on a commercial flight in Mexico over the weekend were given a shock when an actual serpent slithered into the cabin.

The Associated Press reports that the snake appeared suddenly on an Aeromexico flight from Torreon to Mexico City, emerging from the ceiling behind an overhead luggage compartment.

The snake is estimated to have been about one metre long.

Passengers scrambled to get out of the snake’s way before it dropped to the floor. A quick-thinking flight attendant then provided people with blankets to trap the snake.

“It was a frightening situation… but people remained calm because it didn’t get out of that space and nobody became hysterical,” passenger Indalecio Medina told the Associated Press. “Some people got up to see what kind of reptile it was, but nobody got carried away.”

In other words, all of the passengers managed to remain calmer than the cast of Snakes on a Plane.

The plane was given priority landing in Mexico City. When it touched down, animal control workers came on board to take the stowaway into custody.

In a statement, Aeromexico said they are investigating how the snake got into the cabin, and will take measures to prevent such an incident from happening again.