NEW YORK -- About 1,200 passengers were stranded on a New Jersey Transit train at New York Penn Station Friday afternoon, another in a series of recent technical problems that have disrupted the lives of thousands of commuters.

Adding to Friday's chaos, throngs of commuters temporarily stranded by delays were sent into a panic at Penn Station when they mistakenly believed they heard gunshots. The noise was actually from a Taser fired by Amtrak police on an unruly passenger who had been stuck on the train, authorities said.

DRUDGE_REPORT: UPDATE: Chaos at Penn Station; Stampeding mob flees as cops use Taser on man... https://t.co/nCAOlbdwOJ -- SavageNation (@SavageNation) April 15, 2017

An NJ Transit spokeswoman said the trouble began a disabled train and was affecting all service along the Northeast Corridor line.

The train was heading into the station when it ceased operating, she said. Later, another spokesperson said the disabled train had left under its own power from the south tube of the Hudson River tunnel. The tube was being inspected by Amtrak Friday night.

Delays of up to two hours were expected into and out of the station, NJ Transit said around 8 p.m., while MidTown Direct service was being diverted to Hoboken.

Six passengers aboard the disabled train suffered non-life-threatening injuries, the New York Fire Department reported.

My cousin one of 1200 stuck on NJ transit train. No one should have to go through this while traveling. pic.twitter.com/RPTnzO6I3u -- Kim (@dancing7blue) April 14, 2017

Commuters expressed their frustration via social media after yet another mishap snarled the rush-hour commute. There have been two derailments in recent weeks, including one that forced several tracks out of service for nearly a week early this month.

Steven H. Santoro, the executive director of NJ Transit, issued an apology to commuters and invited them to contact him personally with concerns.

"To our customers who were significantly delayed today on Northeast Corridor train #3850, and other customers who were impacted by this incident, we deeply apologize for your experience, and I would like to hear from you. Please contact me through our website at njtransit.com using the contact us section on the home page, or call us at 973-275-5555 between 8:30 a.m. and 5 p.m. seven days a week."

Transit and Amtrak were working to determine the cause of the problem, Santoro also said.

Rajeev Dhir contributed to this report.