Passengers were evacuated from a 7 train after it started experiencing mechanical problems mid-tunnel, witnesses said. View Full Caption Desmond Gromes

MANHATTAN — Hundreds of passengers were trapped in a stalled 7 train under the East River for nearly two hours after it started experiencing mechanical problems, the MTA said.

The incident brought service between Queens and Manhattan to a grinding halt during the morning rush.

The contact shoe of a Manhattan-bound train carrying 542 people touched the third rail protection board and created a smoke midway through about 8:41 a.m., the MTA said.

The riders were trapped until about 10 a.m. when a rescue train brought them back to Grand Central Terminal, officials said.

"There was a flash and a jolt outside of our car and the train just kind of ground to a halt," said Ashley Baxstrom, 30, who was commuting to her policy advisor job at the United Nations.

"The power went out, and then it started to smell a little bit like smoke. It was very sudden."

Officials were still investigating how the smoke was generated, but a spokeswoman said that the shoe could have knocked debris onto the electrified third rail.

"It was a normal commute until we got underground and then out of nowhere there's smoke coming from the car in front of us," said Desmond Gomes, 26, who was heading into his security job at a drug treatment facility.

"Everyone in the entire train got silent. I took my headphones out and everyone started looking around, 'What's going on? Why is there smoke everywhere?'" Gomes said.

The conductor eventually told the riders what had happened over the PA system as MTA workers made their way to the train, riders said.

"There were some people who started freaking out and moved to different cars. but I think there's a congeniality where everybody's like, 'We're New Yorkers. We're all here together. We'll figure it out,'" Baxstrom said.

The MTA sent a rescue train to retrieve the passengers on board and return them to Grand Central Terminal, an MTA spokeswoman said.

"Starting from the back, they had everybody move to the front of the train," Baxstrom said.

The line was suspended between Hunters Point Avenue and Times Square as crews retrieved the trapped passengers, the MTA said.

Service on the 7 line resumed about 10:30 a.m. with some delays, according to the MTA's website.

No injuries were reported, an FDNY spokesman said.

Commuters clogged the intersection at Vernon Boulevard and Jackson Avenue while the 7 was still suspended.

Many complained about the 7's frequent problems and said they weren't surprised it was down again.

"It's absolute nonsense," said Alex Pecor, 34, of Hunters Point.

"We can all understand some problems here and there. Nobody's perfect. But this is the other end of the spectrum. It's pathetic."

Others agreed.

"It's frustrating," said Caroline Paul.

"It's kind of a fact of life, but a pretty sad fact of life for us," she added.

Just another morning on the 7 train. #blessed pic.twitter.com/rteYdiFBos — Megan Ranney (@heyybrighteyes) April 6, 2015

Firefighters visited the subway station at Vernon Boulevard and Jackson Avenue after a train stalled near the station. View Full Caption Twitter/@MatthewKnell

With reporting by Jeanmarie Evelly