The captain of doomed Air India Flight 171 has been credited with saving dozens of lives by guiding the jet away from a row of apartment blocks moments before impact.

Captain Sumeet Sabharwal, an experienced pilot with more than 8,200 hours in the cockpit, was at the controls when his Boeing 787 Dreamliner bound for London Gatwick lost thrust seconds after leaving India's Ahmedabad airport on Thursday.

He and co-pilot First Officer Clive Kunder placed a mayday call, but they had little over a minute after the engines lost power before ploughing into the ground.

The gigantic passenger jet was headed towards the B.J. Medical College and Civil Hospital and a street of residential properties nearby - until the powerless aircraft banked slightly seconds before it hit the ground and exploded.

All but one of the 242 passengers and crew members on board were killed.