New York (CNN) An Amtrak train traveling from Boston to Washington had a "minor" derailment Friday morning as it passed through New York Penn Station and sideswiped a NJ Transit train.

The Acela Express train was moving at a slow speed out of Penn Station when it derailed, and its rear remained on the platform, Amtrak said. That derailed Amtrak train then sideswiped a NJ Transit train that was coming into Penn Station, NJ Transit said in a tweet

All passengers on both trains safely exited the trains onto the platform, the companies said.

Rail service into and out of New York Penn Station was delayed for several hours on Friday. Amtrak service into Penn Station resumed just before 12:30 p.m., the company tweeted

CNN producer Renee Ernst was on the NJ Transit train that was sideswiped.

"As we were pulling into the station we heard a loud noise -- it was like metal crushing," she said in an email. "It lasted for about 15 seconds. It was very loud and rocked the train. People were already standing up preparing to disembark the train but no one in my car fell.

"We were all looking at each other asking, 'What was that?' " Ernst said.

Jordan Geary was with his wife on the NJ Transit train heading to work when he heard a "giant explosion" that he said "knocked in all the windows, mangled all the metal on the side of our train, [and] knocked some of the doors ajar."

At first, he thought it might have been something more serious, like a bomb, he said.

"It wasn't until we felt this other train raking the side of our train, and I heard the screams behind me, that I said 'Oh, something hit us and is still hitting us,'" he said.

New York Penn Station was by far Amtrak's busiest station last year, with ridership of more than 10.4 million.