Two U.S. airliners nearly collided while flying between Hawaii and Los Angeles in what would have been one of the world's worst aviation disasters, reports say.

Passenger Kevin Townsend said his United Airlines Flight 1205 went into a steep dive at 10,058 metres on April 25 to avoid a U.S. Airways plane travelling at the same altitude. He told KPIX news in San Francisco that he was on his way home from a vacation in Hawaii.

"It was a really violent, scary experience," he said. "It felt like the plane had gone dead in the air and started dropping."

Townsend wrote about his experience in a story that appears on Medium.com.

The U.S. Federal Aviation Administration and National Transportation Safety Board are both investigating the incident, the Honolulu Star Advertiser reported on its website.

The two Boeing 757s were 12.9 kilometres apart when the Traffic Alert and Collision Avoidance System on both planes kicked in, the paper said. At that point, the United flight dived and the US Airways plane climbed.

Close as they got

"Weightless and staring downhill at the thirty-some rows of passengers ahead of me, I had a rare and terrible reminder of the absurd improbability of human flight," Townsend wrote.

He wrote that he spoke with the flight crew after the plane landed in Los Angeles and learned more details, including that the United captain, after hearing the alarm, looked out the windshield and could see the other plane coming at him.

"At altitude, a pilot can see a long way from the cockpit," Townsend wrote. "Even so, at our speed, long distances can close incredibly quickly. Our plane was cruising at 600 mph. Two planes coming at each other at that speed will close a distance of five miles in fifteen seconds."

Twelve seconds after the pilots responded to the alarms, according to radar, "the planes were separated by 5.3 miles [8.5 kilometres] laterally and 800 feet [244 metres] vertically," the newspaper said. That was as close as they got.

A U.S. transportation official told CBS This Morning that the automatic collision avoidance system had worked the way it was designed to.

It remains, however, for authorities to determine what caused the near-collision and to what degree air traffic control failed.

The required separation for commercial aircraft at cruising altitudes is typically five miles [eight kilometres] laterally and 1,000 feet [305 metres] vertically.