Updated

A potential tragedy was averted at San Francisco International Airport late Tuesday morning when an Aeromexico plane avoided landing on the same runway where another plane was waiting to take off.

The plane was about a mile away from the airport when air-traffic controllers noticed it was preparing to land on the wrong runway. But they were able to warn the pilot in time, the San Francisco Chronicle reported.

The pilot had been instructed to land on runway 28R, the paper reported, but instead the plane approached runway 28L -- which was occupied by a Virgin America flight, Ian Gregor, a spokesman for the Federal Aviation Administration, told the paper.

The Federal Aviation Administration is investigating the incident.

Although last year was considered one of the safest for commercial aviation, several close calls did occur.

In December, at New York City’s John F. Kennedy International Airport, an aircraft attempted to land on the same runway where a plane was getting ready to take off. Luckily, air-traffic controllers were able to avert a potential disaster.

Over the summer an Air Canada flight nearly landed on the same runway where four other planes were waiting to take off at San Francisco International Airport.