Passengers on board an AirAsia flight from Malaysia had a harrowing experience straight out of a Samuel L. Jackson movie after a snake was spotted slithering inside the plane's overhead lights.

One of the passengers was able to take a video of the large snake slithering above the passengers while they were in the air. The video, which was posted on social media, showed the snake moving around the aircraft's overhead lights.

The passenger captioned the video with the phrase, "Snakes in the plane," which is likely a reference to the 2006 classic "Snakes on a Plane." Several comments on the video, which had over 2.6 million views, heavily referenced the movie, while some asked where Samuel L. Jackson was to help get rid of the snake.

The AirAsia flight, reportedly, left the Malaysian capital of Kuala Lumpur and was headed to the city of Tawau. After the snake was spotted, the aircraft's pilot decided to reroute the flight to the city of Kuching, which was only around 550 miles away from Tawau.

AirAsia's chief safety officer Captain Liong Tien Ling said that several passengers were quick to spot the snake and alert the plane's crew. He said that once the plane had landed, the aircraft was immediately fumigated before the passengers were allowed back on board to resume their flight.

The airline did not specifically state what was done to the snake or where they had taken it after it was removed from the aircraft. The company also did not say what type of snake was found and how exactly it was able to enter the aircraft.

Ling said having a snake in one of their planes is a "very rare incident," but it does happen to some aircraft from time to time. Small animals can stow away in aircraft undetected, but it isn't really a big issue most of the time, and no one has since been seriously hurt. Ling said AirAsia places the safety and well-being of its crew and guests as its top priority. He added that at no time during the flight were passengers at any risk as the snake was stuck inside the housing of the overhead lights.

Snakes have made their way into planes in the past. In 2016, a snake was able to crawl its way inside an aircraft during a flight from Mexico. One of the passengers on the flight was able to capture the reptile, which was curled inside the plane's overhead storage bin before it landed. A similar incident occurred aboard a separate flight from Alaska just a year later.