The Long Island Rail Road is investigating an incident caught on video of a passenger apparently drinking a beer while seated inside one of the control cabs of a moving train.

An LIRR passenger shot the video with her cellphone aboard a Babylon-bound train Thursday evening.

It shows an unidentified passenger reading a newspaper and sipping a can of beer while seated inside one of the various engineer compartments of an electric train.

LIRR spokesman Salvatore Arena noted that every other car in an electric train has such a compartment, and that it was not being used to control the train at the time.

The passenger "could not have affected the motion of the train from that position," other than by activating the emergency brakes, which also could be triggered from other locations accessible to riders, Arena said Tuesday.

"The incident is under investigation," Arena said. "Obviously, the door should have been locked."

Anthony Simon, general chairman of the Sheet Metal, Air, Rail and Transportation Union, which represents LIRR conductors, said Tuesday that door locks can sometimes malfunction, causing a door to swing open.

"I am extremely confident nobody's safety was at risk and that our crews will remain diligent in protecting the safety of our riders as we do 24/7," Simon said. "We must remind our riders these areas are off limits regardless of the door being open or closed."