It was the latest problem to hit an airline from Indonesia, which relies heavily on air transport to connect its thousands of islands but has a poor safety record and has suffered several fatal crashes in recent years.
The Boeing 737 operated by Sriwijaya Air was 1.5 hours into the five-hour flight Thursday when its system detected that a passenger door at the front of the aircraft had not shut properly, said spokesman Agus Soedjono.
The plane returned to the southern Chinese city of Guangzhou, where it had set out from, and was checked for 30 minutes before taking off again for Denpasar, the capital of the resort island of Bali.
The plane was carrying 180 passengers and 12 crew but after it was forced to turn back, about 20 passengers decided not to continue when the aircraft set off again for Bali, he said.
More From This Section
No one was hurt or injured in the incident.
It has suffered three accidents since 2008 that caused substantial damage to the aircraft involved, according to the Aviation Safety Network, which monitors plane accidents.