Smoke filled the cockpit of an American Airlines flight from Puerto Rico, forcing an emergency landing, an airport official said.

Seven people — the pilot, co-pilot, three flight attendants and two passengers — were taken to a hospital Wednesday, but none of the injuries was life threatening, The Palm Beach Post reported.

A windshield was also broken, but the reason was unclear.

The plane had left San Juan for Philadelphia and landed safely at Palm Beach International Airport, said Casandra Davis, an airport spokeswoman.

The Federal Aviation Administration is investigating.