An AirAsia X flight bound to Kuala Lumpur, Malaysia was forced to return back to Perth, Australia after the aircraft began to violently shake due to a "technical issue". The pilot, who asked passengers to pray twice on the way back, identified the problem as engine failure.

"The pilot identified a technical issue with the engine. The plane turned around and safely landed back at Perth Airport," a spokesman for Perth Airport told CNN.

Passenger Damien Stevens told CNN that a "loud bang" was heard about an hour into the trip. "It shook for the whole ride back, close on two hours," Stevens said.

"I could tell by the cabin crew's reaction that it was really bad," fellow passenger Sophie Nicolas told ABC News.

Footage of the incident shows the plane shaking violently. "It was really shaking, very scary," Stevens added. Stevens and friend Mitch Jamieson were headed to Myanmar on holiday, CNN reported.

Stevens told CNN that the pilot asked passengers to pray twice. Passengers were also told to hold the "brace position" for around two minutes during the landing, he noted. "I was crying a lot, a lot of people were crying, trying to call their mums and stuff but we couldn't really do anything just wait and trust the captain," Nicolas said.

"The plane erupted with applause once we landed," Stevens said.

The pilot reportedly shook hands with every passenger following the tumultuous flight.

AirAsia X Berhad, the long-haul arm of low-cost carrier AirAsia, confirmed in a statement that the flight took off at 6.40am local time and landed back at Perth Airport shortly before 10am. "The safety of our guests is our utmost priority," the airline said.

It is unclear what caused the issue with the jet's Rolls-Royce engines, CNN reported. "We are aware of the incident and will be working closely with relevant partners to understand the cause of the issue," a spokesman for Rolls-Royce said.