The tailpiece of the crashed Air India Dreamliner juts from a building in Ahmedabad
The tailpiece of the crashed Air India Dreamliner juts from a building in Ahmedabad AFP

Investigators recovered a black box recorder on Friday from the crash site of a London-bound passenger jet that ploughed into a residential area of India's Ahmedabad city, killing at least 265 people on board and on the ground.

The Air India Boeing 787-8 Dreamliner issued a mayday call shortly before it crashed around lunchtime on Thursday after lifting barely 100 metres (330 feet) from the ground.

One man on board the plane, which was carrying 242 passengers and crew, miraculously survived the fiery crash, which left the tailpiece of the aircraft jutting out of the second floor of a hostel for medical staff from a nearby hospital.

"Initially, I too thought that I was about to die, but then I opened my eyes and realised that I was still alive," survivor Vishwash Kumar Ramesh, a British citizen, told national broadcaster DD News from his hospital bed.

The nose and front wheel of Air India flight 171 landed on a canteen building where students were having lunch, witnesses said.

Deputy Commissioner of Police Kanan Desai said 265 bodies had been counted so far, which suggested that at least 24 people were killed on the ground. The toll could rise further as more body parts are recovered.

"The official number of deceased will be declared only after DNA testing is completed", Home Minister Amit Shah said in a statement late on Thursday. DNA samples will be taken from family members of the dead who live abroad, he said.

Air India said there were 169 Indian passengers, 53 British, seven Portuguese and a Canadian on board the flight bound for London's Gatwick airport, as well as 12 crew members.

Prime Minister Narendra Modi visited the devastated neighbourhood on Friday and was also pictured by survivor Ramesh's bedside.

Ramesh, who suffered burns and other injuries, said: "Everything happened in front of me, and even I couldn't believe how I managed to come out alive from that."

"Within a minute after takeoff, suddenly... it felt like something got stuck... I realised something had happened, and then suddenly the plane's green and white lights turned on."

Aviation Minister Ram Mohan Naidu Kinjarapu said that a flight data recorder, or black box, had been recovered, saying it would "significantly aid" investigations.

In Ahmedabad, disconsolate relatives of passengers gathered at an emergency centre on Friday to give DNA samples so their loved ones could be identified.

Ashfaque Nanabawa, 40, said he had come to find his cousin Akeel Nanabawa, who had been aboard with his wife and three-year-old daughter. They had spoken as his cousin sat in the plane before takeoff.

"He called us and he said: 'I am in the plane and I have boarded safely and everything was okay'. That was his last call."

One woman, too grief-stricken to give her name, said her son-in-law had been killed.

"My daughter doesn't know that he's no more", she said, wiping away tears.

"I can't break the news to her, can someone else do that please?"

Volunteer rescuers described seeing "bodies everywhere".

"The bodies were totally burnt. It was like coal," said Bharat Solanki, 51, who was working at a nearby fuel station and rushed to the site with a couple of friends.

Ahmedabad, the main city in India's Gujarat state, is home to around eight million people and its busy airport is surrounded by densely packed residential areas.

"One half of the plane crashed into the residential building where doctors lived with their families," said Krishna, a doctor who did not give his full name.

US planemaker Boeing said it was in touch with Air India and stood "ready to support them" over the incident, which a source close to the case said was the first crash for a 787 Dreamliner.

India's aviation authorities ordered Air India on Friday to "carry out additional maintenance actions" on its fleet of Boeing 787-8/9 Dreamliners equipped with GEnx engines.

The carrier has 34 Dreamliners, although it was not immediately clear how many have the advanced GEnx engines.

UK and US air accident investigation agencies are sending teams to support their Indian counterparts.

India has suffered a series of fatal air crashes, including a 1996 disaster when two jets collided mid-air over New Delhi, killing nearly 350 people.

In 2010, an Air India Express jet crashed and burst into flames at Mangalore airport in southwest India, killing 158 of the 166 passengers and crew on board.

Experts said it was too early to speculate on what may have caused Thursday's crash.

"The aircraft is designed to be able to fly on one engine, so the most likely cause of the crash is a double engine failure," said Jason Knight, senior lecturer in fluid mechanics at the University of Portsmouth.

"The most likely cause of a double engine failure is a bird strike."

The growth of its economy has made India and its 1.4 billion people the world's fourth-largest air market -- domestic and international -- with the International Air Transport Association projecting it will become the third biggest within the decade.

Relatives mourn for Akash Patni, a 14-year-old boy killed on the ground when the Air India jet crashed into buildings in a residential area of Ahmedabad
Relatives mourn for Akash Patni, a 14-year-old boy killed on the ground when the Air India jet crashed into buildings in a residential area of Ahmedabad AFP
Satellite image from Planet Labs PBC showing the Ahmedabad airport area, in northwest India, and the flight path of the Air India plane which crashed Thursday, June 12, shortly after takeoff with 242 passengers and crew aboard
Satellite image from Planet Labs PBC showing the Ahmedabad airport area, in northwest India, and the flight path of the Air India plane which crashed Thursday, June 12, shortly after takeoff with 242 passengers and crew aboard AFP
Medics collect a DNA sample from a relative of a passenger aboard the crashed plane
Medics collect a DNA sample from a relative of a passenger aboard the crashed plane AFP
Rescuer workers and investigators comb through the crash site
Rescuer workers and investigators comb through the crash site AFP