A Long Island Rail Road train smashed into a taxi, killing the driver and seriously injuring his passenger in Suffolk County on Wednesday afternoon, officials said.

Daniel Seagren, 49, stopped his cab on the tracks after he drove through the crossing gates while they were down, signaling an oncoming train approaching on Wading River Road in Manorville around 12:45 p.m, according to the MTA Police Department. 

Moments later, a LIRR train barreled into the car.

A cab driver was killed and his passenger injured after a train smashed into the vehicle in Manorville.

Seagren, of Ronkonkoma, was rushed to Peconic Bay Hospital but could not be saved. 

The cab customer was airlifted to Stony Brook Hospital in serious but stable condition, according to cops. 

Around 50 passengers were on the train — which was traveling eastbound from Ronkonkoma to Greenport — when it crashed east of Yaphank Station.  

The train was traveling from Ronkonkoma to Greenport when the crash occurred.

None of the train passengers were injured, the MTA police said.