A railroad crossing in Nassau County turned into a chaotic disaster scene on Tuesday night when two Long Island Rail Road trains traveling in opposite directions struck a car that had swerved around lowered gates and onto the tracks, killing three people.
The rush-hour collision occurred near the Westbury station, about 30 miles east of Manhattan, setting off fires that terrified passengers before they could escape. The authorities said that at least seven people on the trains were injured; the three people who were killed were in the car.
After the driver of the vehicle went around the gates, an eastbound train pulling out of the station struck the car, according to Phillip Eng, the president of the railroad.
Another train, traveling westbound, then crashed into the vehicle and pushed it down the tracks before the front two cars of the train derailed and collided with the concrete platform.
By late Tuesday night, the westbound train still lay against the Westbury station’s platform, part of which had been knocked over.
One of the trains had been carrying about 800 passengers and the other held about 100 passengers, Mr. Eng said.
“It was like a bad movie,” said Michelle Asprer of Hicksville, N.Y., a passenger in the second-to-last car on the eastbound train. “It was so scary.”
She said her train stopped after Westbury without explanation. “There was a whole line of cars” at the grade-level crossing where the train stopped, she said.
She said she heard a westbound train approaching and “making a funny noise.”
“It hit us,” she said. “It hit the last car” of the eastbound train, she said. “The people from the last car were running up, saying ‘Move up, move up because the last car is on fire.’”
A passenger on the westbound train, Mike Picarella, 36, was in the back of the train when, around 7:20 p.m., he heard “a little thump.” He said he didn’t think much of it, but seconds later, there was a second, bigger thump, he said.
“You knew something happened,” Mr. Picarella said. “The train stopped.”
Realizing their train had hit something, the passengers stood up and then looked out the window, where they saw another train. At first many wondered if they had hit it.
But there was a fire raging, too, flames knifing up from underneath the train, halfway up the windows. On the ground below was half of a crumpled vehicle.
Within a minute of stopping, the train started filling up with smoke, Mr. Picarella said, and passengers were quickly moved to the front. Eventually, the doors were opened to let the smoke out, he said, and passengers could then see that a train car had peeled off the tracks.
Mr. Picarella, who is a maintenance manager for New York City Transit, praised the response of local emergency responders and the police, who he said arrived within minutes of the crash, and got people off the train quickly.
Rescuers could not immediately identify the vehicle or its passengers because the car was damaged so severely, said Commissioner Patrick Ryder of the Nassau County Police.
Mr. Eng said that the authorities often warned drivers about the dangers of trying to cross ahead of trains.
“You’re not only taking your own life into your hands, but you’re taking the lives of others into your own hands: our engineers, our conductors, our customers and anyone else along the local road. It’s unfortunate,” Mr. Eng said.
Mr. Eng added that Wednesday morning service would undoubtedly be affected.
Gov. Andrew M. Cuomo issued a statement calling for the Metropolitan Transportation Authority, the State Police, local law enforcement and the National Transportation Safety Board to investigate the crash.
“As we continue to gather information surrounding the incident, my heart goes out to the victims and their loved ones,” Mr. Cuomo said.
Crashes at railroad crossings have occurred with surprising regularity in the New York region over the last decade, federal data show.
At the same time, the number of accidents and fatalities at these crossings has fallen nationally, as grade crossings have been eliminated and safety improvements made, according to safety groups.
In 2015, a crowded Metro-North train passing through Westchester County at the height of the evening rush slammed into a sport utility vehicle on the tracks at a crossing, killing seven people.
The crash in Westbury was the second fatal encounter on the railroad on Tuesday. At about 3:45 p.m., a westbound train struck and killed a pedestrian between the stations in Baldwin and Freeport, said Chris McKniff, a spokesman for the L.I.R.R. That accident caused long delays for commuters who were trying to get home from Pennsylvania Station in Manhattan.
Mr. McKniff said service had been restored around 5:45 p.m., about an hour before the crash in Westbury.