SOMERSET, Pa.—State police say a western Pennsylvania man has been seriously injured after he tried to drive his car through a railroad crossing before a train passed.

Troopers say 43-year-old Brian Ronald Trent, of Somerset, was injured just before 10 a.m. Tuesday at a crossing in Somerset Township. That's about 50 miles southeast of Pittsburgh.

Witnesses tell police that railroad crossing lights were flashing when Trent drove his car across the tracks and was struck on its passenger side by a CSX freight train. The car spun along the tracks before the rear of the vehicle was also hit by the train.

Police say in a news release that Trent suffered unspecified serious injuries.

He was flown to Conemaugh Memorial Medical Center in Johnstown, where hospital officials say he was undergoing surgery Tuesday afternoon.