(Reuters) - Faulty instructions by air traffic controllers caused a near mid-air collision involving an American Airlines Boeing 777-200 and a U.S. Air Force C-17 cargo plane near New York City in January 2011, a federal report said.

The report by the National Transportation Safety Board said the airliner and the C-17 were put on a collision course in the dark over the Atlantic Ocean about 88 miles off New York after controllers mistakenly instructed the planes to converge in the same area. The C-17 was one of two flying in formation.

The error was revealed by a radar data processing system before the planes came into contact, said the report. At one point, they were less than 2,000 feet apart, it said.

"That guy passed us now and that was not good," the pilot of American Airlines flight 951 told the controllers at New York Air Traffic Control Center, the country's busiest.

A collision-avoidance system aboard the American Airlines plane helped to avoid a collision, alerting the pilot to the presence of the military planes.

Ann Marie Brennan, a manager at the air-traffic control office, was quoted in the report, released on Aug. 2, as saying the radar display showed the two planes "pass right over each other".

The incident occurred on Jan. 20, 2011. The American Airlines flight had taken off from John F. Kennedy international airport and was bound for Sao Paulo, Brazil.

The flight was carrying about 250 people, the Wall Street Journal reported on Sunday.