A smoke condition in the cockpit that prompted an American Eagle crew to return its flight to Long Island MacArthur Airport Tuesday morning turned out to be caused by a burned-out lightbulb, according to the airline.

Flight 4868, a twin-engine turboprop de Havilland DH8 operated by Piedmont Airlines, landed safely at MacArthur at 6:50 a.m., the Federal Aviation Administration said. The flight had departed MacArthur at about 6:10 a.m.

advertisement | advertise on newsday

The flight, carrying three crew members and 40 passengers, returned out of “an abundance of caution,” American Airlines said in a statement.

As a formality, the FAA said it would investigate the incident.

American issued a statement that read, in part, “it was a burned out light bulb, which caused the smoke in the cockpit. Out of an abundance of caution, the crew decided to return to Islip to have the issue checked by our maintenance team.”

The airlines said the issue was fixed — and said the flight had “redeparted” for Philadelphia — by about 9:15 a.m.