United States federal safety officials blame two Air Canada pilots for coming within three to six metres of crashing their jetliner into a plane on the ground last year in San Francisco.

The Air Canada pilots were apparently confused because one of two parallel runways was closed and dark before the late-night incident. The crew was seconds from landing their Airbus A320 jet on a taxiway where other planes loaded with passengers were waiting to take off.

"We could not have gotten literally or figuratively any closer to having a major disaster," said the safety board's vice chairman, Bruce Landsberg, during a hearing Tuesday in Washington.

Underscoring the severity of the incident, the NTSB's top aviation-safety staffer, John DeLisi, said it was the first time the board considered a major investigation for an event in which there were no injuries or damaged planes.

The board said the Air Canada crew mistook the taxiway for a runway because they didn't adequately review a warning to all pilots about one of the runways being closed for construction. The board cited other mistakes and crew fatigue as contributing factors.

Air Canada spokesman Peter Fitzpatrick said the airline would review the safety board's recommendations and has already taken steps to improve training and procedures.

The two pilots "are being held out of service," he said.

The safety board recommended the development of technology to warn pilots and air traffic controllers when a landing plane appears to be aimed at a taxiway instead of a runway. It also said the Federal Aviation Administration should consider better lighting and markings to warn pilots about closed runways.

The cockpit voice recorder might have helped investigators better understand how the near-accident unfolded. However, the recording was taped over because the NTSB wasn't notified of the incident for nearly two days.

"When we learned of a passenger airliner almost touching down on a taxiway occupied by four other airliners, we elected to launch a full investigation," DeLisi said.

The July 2017 incident occurred just before midnight -- it felt like 3 a.m. to the pilots, who had taken off from Toronto. The safety board recommended that Canada strengthen rules to prevent pilot fatigue.

The safety board's chairman, Robert Sumwalt, urged the FAA and Canadian officials to adopt the recommendations "so that we do not have to relearn the lessons of this incident at a far greater cost."

Meanwhile, the union representing Air Canada pilots said the NTSB's findings "underscore the many years of urgent calls by Canada's pilots for flight crew fatigue rules that are supported by science."

"The government's proposed rules fall short; they would allow Canadian pilots who begin their duty at 9 p.m. to operate two hours longer than NASA research recommends, and even longer than would be permitted in the United States," Capt. Matt Hogan, of the Air Canada Pilots Association, said in a statement Tuesday.

The Air Canada crew was cleared to land on 28R, to the right of the closed runway, 28L. According to a preliminary NTSB report, the pilots thought the lighted runway was 28L -- not theirs. Despite visual cues such as different lighting on taxiways, they aimed their jet to land to the right of 28R, on a parallel taxiway where the other planes were waiting to take off.

According to the NTSB, the pilots told investigators that they didn't see planes on the taxiway, but that something did not look right.

A United Airlines pilot in one of the planes warned air traffic controllers about the onrushing Air Canada jet, and pilots on a Philippine Airlines jet switched on their landing lights in an apparent warning manoeuvre.

The Air Canada pilots abandoned the landing and pulled their plane up just in time to avoid catastrophe. An NTSB staff member said Tuesday that they calculated the plane flew 10 feet to 20 feet above the first of the four waiting jetliners, then circled and returned for a safe landing.

Both pilots of the Airbus A320, which was arriving from Toronto, were experienced. The captain, who was flying the plane, had more than 20,000 hours of flying time, and the co-pilot had about 10,000 hours.

In May, federal officials blamed pilot error for three other close calls in the previous 16 months at the San Francisco airport. Pilots say that the airport, with parallel runways close to each other, requires special attention during landings.

The Air Canada incident led the FAA to issue new rules for the airport covering nighttime landings when one of the runways is closed and better late-night control-tower staffing.