Rare footage of the search for a passenger plane that crashed into the Atlantic Ocean in one of the worst accidents in recent aviation history has been released on the 10th anniversary of the tragedy.

A new documentary highlights the international operation to find and retrieve the wreckage of Air France flight AF447 from Rio de Janeiro in Brazil to Paris, France, that fell from the sky on 1 June 2009, killing all 228 passengers and crew.

The search cost €31m (£27m) and took almost two years, but only by recovering the black box flight data and voice recorders at the bottom of the ocean was France’s air investigation agency (BEA) able to solve the mystery of why the plane crashed.

Simon Kessler, director of the documentary In Search of Flight AF447, said the previously unseen footage – recorded during the search – showed it was like “looking for a bottle of water” in the middle of the ocean.

“It was the biggest search for an aircraft organised by France and the whole thing was recorded, but the footage was sleeping in a safe box with the authorities on the outskirts of Paris,” Kessler said. “It was a rare find.”

He added: “Films have been made about the accident, but this is the first documentary of the search.”

The documentary director said the search was like ‘looking for a bottle of water’ in the ocean. Photograph: Galaxie / ECPAD

AF447 was flying through a storm over the south Atlantic when it disappeared. The Airbus A330-203 was in a blackspot between air traffic control towers in Brazil and Senegal, but still sending automatic communication “pings” every 10 minutes. Four minutes and 23 seconds after its last ping, it vanished.

Black box data showed the aircraft’s speed recorders – pitot tubes – had frozen, setting off a catastrophic chain of events in the cockpit. The pilots were confused and unaware they had stalled the plane – which was plummeting – until seconds before it slammed into the ocean at around 200km/h.

Olivier Ferrante, a senior adviser at the BEA, oversaw the 22-month underwater search that involved combing 17,000 sq km of ocean bed at depths of up to 4,000 metres. Ferrante told the Guardian the operation had taken money, international expertise, mathematics and “in the end a bit of luck”.

“Our mission is to find out what happened as quickly as possible to prevent another possible accident so time is our enemy and for five long days until the first pieces of floating debris were found we hadn’t a clue,” Ferrante said.

“We had a search zone with a radius of 40 nautical miles where the aircraft could be. It was complicated.” He said if the wreckage had been on a rocky rather than sandy ocean bed “we may not have found it”.

Divers recover part of the tail section from the Air France aircraft that crashed over the Atlantic ocean on 1 June 2009. Photograph: HO/AFP/Getty Images

Mike Purcell, a principal engineer at the Massachusetts-based Woods Hole Oceanographic Institution (WHOI), whose team finally spotted the AF447 wreckage, said the discovery was a “great achievement”.

“We suddenly realised what a catastrophe it was … it was not easy to look at the pictures, but I know from talking to relatives of victims that it meant a lot to them that the plane had been found,” Purcell told Hydro International magazine.

For the families of the 239 people aboard Malaysia Airlines MH370 from Kuala Lumpur in Malaysia to Beijing in China whose disappearance on 8 March 2014 remains a mystery, there has been no such consolation. The search was called off a year ago.

Kessler says the last part of the AF447 search operation, that of recovering passengers’ bodies from the ocean bed, was not filmed.

“It’s a fascinating and compelling story but also a sensitive one as it’s a real story of human beings. That’s why we also contacted and interviewed relatives of passengers for the film.”

Air France and Airbus have been put under investigation for “involuntary homicide” and the BEA reports suggested a number of factors, including human error, led to the tragedy. The legal investigation ended in March, but a decade on there is no indication if or when there will be a trial.

The documentary will air on Planète+ in France and on Amazon Prime in the UK and the US.