Two Qantas passenger aircraft were just seconds from colliding when they came within 220 metres of each other near Adelaide yesterday.
Collision-avoidance systems were set off as a Sydney-to-Perth plane came too close to a Perth-to-Sydney plane over the Great Australian Bight early in the afternoon.
The plane travelling from Sydney had been granted permission by air traffic control to climb.
An air traffic controller has reportedly been stood down over the incident.
Passenger Gary Martin witnessed the near-miss.
"There was nothing reported; I just happened to look out the window somewhere in South Australia and saw a plane fly underneath," he told reporters at Perth Airport.
But many other passengers arriving at the airport were unaware of the near-miss and believed the flight was normal.
Qantas says the Airbus A330 aircraft had a "loss of separation".
"Our pilots followed standard operating procedures in re-establishing the required separation distance," the airline said.
The Australian Transport Safety Bureau (ATSB) has begun an investigation which will include examining radar and audio data and interviewing air traffic controllers and flight crew.
It said the incident occurred just after midday (Australian Eastern Standard Time), 19 kilometres west of Adelaide, when one plane had begun to climb from 38,000 feet to 40,000 feet after being cleared to do so.
"Soon after, the controller cancelled the clearance and the aircraft descended back to 38,000 feet," the bureau said.
It said the flight crew of the second plane received a resolution advisory alert from the aircraft's traffic collision avoidance system, requiring immediate action.
The bureau said it expected to complete the investigation of the incident this month.
The aviation editor of the West Australian newspaper, Geoffrey Thomas, said all passengers would have died if the planes had collided.
"From an accident like that there would be no survival whatsoever," he told the Seven Network.