Flight AI 403, which was travelling from Delhi to Bangalore, was diverted to Bhopal Airport on Monday.
"The captain 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 1755 hrs."
It may be added that Air India has been plagued by financial difficulties in recent years, with its 787 Dreamliner jets grounded in January by safety concerns.