A New Jersey Transit train derailed at Penn Station on Thursday night, adding to the ongoing commuter nightmare.

The accident took place just days before extensive track work is scheduled to begin at the transit hub.

About 180 people were on the North Jersey Coast Line train from Long Branch, which was nearing the station when the slow-speed derailment happened at 9 p.m.

“You could hear a loud bang and dragging sound,” said Donel Gregory, a vendor who works at the station. “I got out of there.”

No injuries were reported. Only one car left the tracks and passengers were transferred to another train that was sent to pick them up.

Amtrak and the Long Island Rail Road said their trains would not be affected, but NJ Transit said its riders should expect “extensive’’ delays Friday morning.

Riders were outraged.

A passenger on the derailed train, who asked to be identified only by her first name, Nina, said, “It’s like every week here. You just want to scream.’’

Tomas Bosa was in the station.

“I was here to meet my fiancee on that train. It’s like walking into a funhouse … everything seems upside down,” he said.

Necchie Goldman, a daily NJ Transit commuter who was not on the stalled train, said, “This just isn’t normal.

“Trains should run. Who’s in charge?’’ she asked.

Other people in the station were equally angry.

“We live in the best city in the world and yet we have a Third World transit system,’’ said Glen Ragneer. “Something has to be done.’’

Sections of the station used by NJ Transit were closed down for a while. “I don’t know how people are getting home tonight,’’ Gregory added.

It’s the third recent derailment at Penn Station. The others were in March and April and led to major delays and cancellations.

Amtrak, which owns the station and is responsible for the condition of the tracks, is set to begin an eight-week-long program of repairs July 10.

The repairs will take place seven days a week and some of the tracks will be out of service 24/7.

Executives at the MTA recently wrote Amtrak, blaming it for “four equipment failures and accidents.’’ They said the problems “resulted in major delays” on tracks owned by Amtrak but used by the MTA’s Long Island Rail Road.