A Malaysia Airlines flight to Hyderabad, India, has been forced to return to Kuala Lumpur due to an autopilot defect shortly after takeoff.

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

The airline statement said that the Boeing 738 plane landed safely at the Kuala Lumpur International Airport early Sunday, nearly four hours after take-off.

Malaysia Airlines has had two major disasters this year. Flight 370 from Kuala Lumpur to Beijing disappeared in March with 239 people on board and a search is underway in southern Indian Ocean. In July, 298 people were killed when Flight 17 from Amsterdam to Kuala Lumpur was shot down over Ukraine.