An Air India flight was forced to land after the pilot was locked out of the cockpit during a toilet break, the airline says.
He was unable to gain access to the cockpit because of a jammed door.
Flight AI 403, which was travelling from Delhi to Bangalore, was diverted to Bhopal Airport on Monday.
The airline has been plagued by financial difficulties in recent years, with its 787 Dreamliner jets grounded in January by safety concerns.
"The commander of the flight had left the cockpit for a short while to visit the toilet and on returning to the cockpit found the door locked. The door had got jammed and all efforts to open the door, even from inside by the co-pilot, failed," an Air India statement said.
"The co-pilot, after taking permission from ground control, diverted the flight to Bhopal and landed...at 17:55 hrs."
The door was fixed by ground maintenance engineers and the plane continued its journey less than three hours later, Air India adds.
The state-run airline is currently investigating a separate incident in which the auto-pilot system of an Airbus 321 flying from Bangkok to Delhi on 12 April was accidentally switched off.
According to the Mumbai Mirror, two pilots had taken a 40-minute break from the cockpit and left two stewardesses in their seats to operate the plane in their absence.
One of the stewardesses accidentally turned off the auto-pilot, forcing the pilots to rush back to their seats, the report said.
Air India has denied this account but said cabin crew did "overstay" in the cockpit and that the autopilot was briefly disconnected "due to distraction".
Meanwhile, Civil Aviation Minister Ajit Singh said on Tuesday that all six of Air India's Boeing 787 Dreamliner passenger jets would resume flying by the end of May, starting with a domestic flight on Wednesday.
The planes have been grounded worldwide since the beginning of the year over a string of incidents, including fuel leaks, a cracked cockpit window, brake problems and an electrical fire.
However, it is overheating in batteries providing auxiliary power that has caused the most concern.
Mr Singh also said he expected the airline to make a net loss of about 40bn rupees ($730m) for the current financial year ending March 2014, compared with about 52bn rupees in the previous year.