NEW YORK (AP) — A subway train carrying some 1,000 passengers shook and tilted before derailing in a Queens tunnel on Friday, injuring more than a dozen people.

Four people suffered serious injuries and had to be taken to the hospital, while 15 others were treated at the scene.

The express F train was heading for Manhattan and Brooklyn when six of its eight cars derailed at 10:40 a.m. about 1,200 feet south of the 65th Street station in Woodside.

Passenger Rashmi Basdeo said that the train suddenly “started to tilt and shake.”

“It was scary,” said the sales associate from Ozone Park, Queens, who was taking the train to work in Manhattan. She held onto a post as the train came “screeching to a stop. … We knew it was derailed from the sounds and the position of the car,” she said.

Dozens of firefighters, police officers and paramedics with stretchers converged on Broadway and 60th Street. They helped passengers off the train, using ladders to descend to the track level and then taking passengers along the track to a sidewalk opening.

Deputy Assistant Fire Chief James Leonard the middle six cars of the eight-car train derailed. The cars remained upright in the accident.

The cause of the accident wasn’t clear. There was no switch in the area, and the tracks were no more than 20 to 30 years old, said Tom Prendergast, the Metropolitan Transportation Authority chairman and CEO. The train’s operator and conductor will be tested for drugs and alcohol, he said.

The four passengers with serious injuries were taken to the hospital complaining of chest pains and other problems, he said.

“It started with a little bit of turbulence,” said passenger Tayyib Siddiqi. “I saw sparks coming out of the right side of the train. And then the train tilted a little bit. There was lot of noise, banging and then it felt like we hit the side wall.”

He said a couple of seconds later the train came to a stop.

“The train filled with smoke from the sparks, the brakes or whatnot. It was terrifying. It was a horrifying experience,” said Siddiqi, adding that there was a lot of crying and frayed nerves afterward. The train went dark after it happened.

The derailment caused “a substantial cloud of dust, which panicked people” but little smoke, said James Leonard, deputy assistant fire chief. The evacuation took about an hour and went smoothly, police and fire officials said.

Derailments are relatively rare in the city’s subway system, one of the largest public transportation systems in the world.

The last derailment on the subway was May 29, 2013, Prendergast said.

The last major derailment was in August 1991, when a No. 4 train came off the tracks at Union Square. Five people were killed and more than 200 were injured. The motorman, who was drunk at the time of the accident, was convicted of manslaughter and sentenced to 15 years in prison.

Transit officials said E, F, M and R trains were running with delays and service changes. Customers could use the J as an alternative. The Long Island Rail Road was cross-honoring tickets at Penn Station, Woodside, Forest Hills, Kew Gardens and Jamaica.

Officials hoped to run local service through the area in time for the evening rush. Prendergast said the express tracks were damaged. Officials planned to put the derailed cars back on the tracks after Friday’s rush hour.