Two planes ended up on a collision course last month after an erroneous warning light slowed a takeoff and an air traffic controller got confused, according to a preliminary report from the National Transportation Safety Board.

On June 20, Delta Air Lines Flight 2351 was cleared to land on runway 33L, following a small plane. A little more than a minute later, and before the Delta flight touched down, American Airlines Flight 3161 was cleared to take off on intersecting runway 27, the report said.

The American Airbus A319 started to roll down the runway but stopped after eight seconds when the pilots received an error message in the cockpit, according to the report. After double checking their systems, they determined it was a false alarm and 23 seconds later they started to speed down the runway toward the intersection.

The pilots in the Delta Boeing 737 saw the potential collision and aborted their landing, eventually circling the airport before safely touching down. The American pilots saw the other plane getting out of their way and continued to take off.

At the closest point the two jets, with a total of 318 people onboard, were 670 feet apart, the NTSB reported.