A Japanese airline captain nodded off twice while at the controls of a domestic flight last month -- in front of a transport ministry official who happened to be on board for a routine inspection.

The 50-year-old All Nippon Airways pilot has been grounded pending an internal probe ordered by industry regulators, company spokesman Kunio Shibata said Friday.

Shibata said that passengers on ANA Flight 693 from Tokyo to Ube, Yamaguchi Prefecture, were never in danger because the Boeing 767-300 was flying on autopilot at the time of the March 23 incident. The plane was carrying 174 passengers at the time.

According to ANA, the pilot started to doze off five minutes after the aircraft had reached its cruising altitude of about 12,000 meters and the autopilot had been engaged.

A Land, Infrastructure and Transport Ministry official on board for a routine inspection noticed and alerted the copilot, who then woke the pilot up.

The pilot, whose name has not been released, nodded off again a few minutes later, prompting the copilot to yell at him.

The airline is investigating the incident, ordered by the ministry, to determine whether the pilot was negligent or suffers from a sleeping disorder, Shibata said. The pilot has 12,000 hours of flying time.

Before piloting the Ube-bound flight, the captain had reportedly woken up at 5 a.m. and flown from Toyama to Haneda, and had gone to bed at 10 p.m. the previous night. (Compiled from AP, Kyodo)