The crew of an Air Canada flight which attempted to land at San Francisco International Airport (SFO) last year narrowly avoided what could have been the worst aviation crash in history, a new report by American air safety officials claims.

On the night of July 7th, 2017, an Air Canada flight which had been cleared to land on an SFO runway missed the runway designated by the air control tower, before the crew attempted to land on a jet taxi lane they mistook for the runway.

According to a newly-released report by the American National Transportation Safety Board (NTSB), the Air Canada flight was about to land on the taxiway, and came within just 59 feet (18 meters) of the ground before the pilots realized their mistake and pulled up.

Had the crew not pulled up when they did, the report says, it would have likely resulted in the worst aviation disaster in history.

Four planes carrying crew members and passengers were sitting on the taxiway at the time of the near miss, investigators said, and the Air Canada flight barely managed to pull up in time to miss the planes on the taxiway.

"Only a few feet of separation prevented this from possibly becoming the worst aviation accident in history," said NTSB vice-chairman Bruce Landsberg.

Had the pilots failed to pull up in time, the accident would have likely killed or seriously injured 1,000 people in the Air Canada plane and the four aircraft waiting in the taxiway.

The most deadly civilian aviation accident on record is the Tenerife Airport disaster of 1977, in which two passenger planes collided over the Canary Islands, leaving 583 dead.