A small snake found onboard a Qantas Boeing 747 airliner, which was bound for Tokyo, delayed the journey of about 370 passengers who were forced to stay in Sydney overnight, airline officials told Associated Press on Monday.

The 20-centimeter Mandarin Rat snake, which grows to an average of 1.2 meters and is commonly found in Asia, was found near the door in the passengers’ cabin. According to reports, a cabin crew member discovered the snake before passengers boarded the flight at Sydney International Airport.

The snake was later euthanized "as exotic reptiles of this kind can harbor pests and diseases not present in Australia," the Agriculture Department told AP. Peter Child, a Canberra Reptile Zoo herpetologist, told the news agency the reptile could have caused ecological damage if it had escaped on the flight with a mate.

The flight to Tokyo had been in Sydney all day Sunday, and it's believed the snake came to be on the plane during a flight from Singapore a day earlier.

"The Department of Agriculture is looking into how the snake came to be on the plane, but isn't able to speculate at this time," Qantas said in a statement cited by AP.

The 370 passengers who were scheduled to take the flight to Tokyo were provided accommodation in hotels on Sunday, and they left Sydney on a replacement flight on Monday morning. The original plane would be returned to service only after being fumigated.

"The snake was taken to quarantine to determine where it came from, and a replacement aircraft – a B747 – operated a replacement service to Narita this morning at 10.15," a Qantas spokeswoman told Guardian Australia.

According to reports, this is the second time in less than a year that Qantas is dealing with a snake issue. In January, during a two-hour flight, passengers saw a three-meter scrub python clinging to the wing of their plane. The snake died during the flight.