Passengers say they were stuck on a sweltering plane for hours after their flight was diverted last week.

The Qantas flight landed at a military base in New Zealand after suffering from mechanical issues.

The flight, which had originated from Melbourne, Australia, was originally headed for Wellington, New Zealand.

Passengers on the plane were told the flight was diverted because one of the plane’s flaps was stuck, news.com.au reported. They said the pilot made an announcement saying the runway at Wellington was too short for the aircraft to land safely.

The plane landed at RNZAF Base Ohakea, which is about 86 miles north of Wellington.

BAGGAGE HANDLER SENTENCED FOR TAMPERING WITH PASSENGERS' CHECKED BAGS IN REVENGE PLOT AGAINST COMPANY

The airbase lacked customs facilities, which meant the passengers had to stay on the plane while they waited hours for buses to arrive and drive them to Wellington, news.com.au reported.

Passengers complained to news outlets about extremely warm temperatures on the plane. The flight landed at around 3 p.m. local time and passengers reportedly didn’t leave on the buses until about 8:40 p.m.

CLICK HERE TO SIGN UP FOR OUR LIFESTYLE NEWSLETTER

Passengers also complained about a lack of updates from Qantas while they waited for the buses to arrive.

Once on the buses, the drive was expected to take two hours.

CLICK HERE TO GET THE FOX NEWS APP

In a statement obtained by news.com.au, a Qantas spokesperson said the airline normally would have diverted the plane to another airport, but weather conditions prevented that. The airline added, “We apologize to our customers for the disruption but safety will always be our first priority.”

Qantas did not immediately respond to Fox News' request for comment.