PORTLAND (NEWS CENTER Maine) — Imagine you've boarded a plane, situated yourself in your seat, you have paid attention to the safety flight instructions, the plane lifts off and then smoke begins filling the air.

Passengers on an American Airline flight that took off from Portland International Jetport experienced just that Wednesday, May 30.

A report of smoke in the cockpit forced American Airlines flight 4933 to make an emergency landing in Boston.

American Airlines tells NEWS CENTER Maine, a mechanical issue caused the plane from Portland to Philadelphia to be diverted to Boston.

The smoke allegedly dissipated quickly, according to American Airlines.

The flight landed safely, taxied to the gate and all passengers were able to get off with no issues at Logan International Airport, according to the airline. The FAA said in a statement the plane touched down at 7:15 p.m.

American Airlines says passengers were rebooked on other flights and the airline provided hotel rooms for those who had to stay the night in Boston.

"We are sorry for the trouble this caused," said American Airlines in an official statement about the incident.

The flight was on an Embraer E145 aircraft operated by Piedmont Airlines. The FAA is investigating the emergency landing.