A Malaysia Airlines flight to India returned to Kuala Lumpur early Sunday due to an autopilot defect shortly after takeoff.

The captain turned back as a precaution and the defect didn't affect the safety of the aircraft or passengers, the airline said.

The Boeing 738 plane, which had been heading to Hyderabad, landed safely at the Kuala Lumpur International Airport nearly four hours after take-off, the airline statement.

Malaysia Airlines has had two major disasters this year. Flight 370 from Kuala Lumpur to Beijing disappeared in March with 239 people on board. It is presumed to have crashed in the southern Indian Ocean though no trace has been found. Underwater vehicles equipped with side-scan sonar, multi-beam echo sounders and video equipment are being deployed to search the seabed.

In July, 298 people were killed when Malaysia Airlines Flight 17 from Amsterdam to Kuala Lumpur was shot down over Ukraine.