Rail cars on a Metro train separated in a Red Line tunnel Tuesday, the second time in less than two months that cars on a moving train have detached. It prompted the transit agency to remove nearly 180 cars from service.

The rail cars came apart about 1 p.m. while the train was in a tunnel between the Wheaton and Glenmont stations in Montgomery County. Emergency responders evacuated 12 passengers who stayed on the train for several minutes until help arrived, Metro officials said.

Montgomery County Fire Department spokesman Pete Piringer said no one was injured.

Train service was suspended for hours between the Glenmont and Forest Glen stations while Metro shuttle buses took passengers between the closed stations.

Metro officials said the train operator reported mechanical trouble shortly after it left Glenmont. When the cars separated, an automatic emergency brake engaged and stopped the cars.

“All indications are that those safety-related features worked as intended today,” Metro said in a statement.

The separation occurred between the fourth and fifth rail cars of the eight-car train, according to the Washington Metrorail Safety Commission, an agency created by Congress that oversees Metro safety. The cars separated at the train’s coupler — a large latch at the end of each rail car that connects to adjoining cars, Metro said in a statement.

It is the second train to separate in nearly two months on the system. On Oct. 9, two rail cars on another Red Line train separated outside Union Station, stranding more than 100 passengers for nearly two hours.

None of the 108 passengers were injured during that incident, although two were treated at the scene after complaining they had chest pains or were short of breath.

That incident involved the same model of rail car as Tuesday’s separation: the 6000 series. In response, Metro on Tuesday sidelined its fleet of 6000-series cars while safety inspectors investigate causes and possible links between the incidents, Metro said.

Metro officials began pulling cars out of service after 2:30 p.m., saying it would take several hours to get all of the 6000-series cars offline.

The 6000 series, put into service in 2006, is the second-newest model in Metro’s fleet. Metro owns 184 of the rail cars out of a fleet of more than 1,200 cars.

More than half of the transit agency’s cars are part of Metro’s 7000 series. Metro said it expected the impact from the ­6000-series’s removal to have a minimal effect on service.

The Washington Metrorail Safety Commission said it supported Metro’s decision to pull the series for investigation.

“To identify potential safety improvements moving forward, the [safety commission] and [Metro] will work to determine the cause of this event, and whether there are any similarities to or differences from prior train separations,” safety commission spokesman Max Smith said in an email.

The 6000-series cars were made by Alstom, a French multinational company, and Metro said it plans to contact the company to add the builder’s technical and engineering expertise to its investigation.

“Safety investigators are collecting data from the incident, including photos and measurements in the tunnel,” Metro said. “Once on-scene investigative work is completed, the cars will be moved to a maintenance facility for further inspection and, ultimately, repair.”

After the October uncoupling, Metro said it inspected its entire fleet of 6000-series cars and their connections, known as “coupler assemblies,” pulling six cars out of service for examination.

During an October Metro board meeting, Chief Safety Officer Theresa M. Impastato cited “potential discrepancies in the coupler assemblies [of the cars pulled out of service] requiring further inspections, including three cars with incorrect hardware.”

The 6000-series fleet is approaching what Metro considers “midlife,” or the 20-year milestone where rail cars are overhauled.

Metro had previously said it might consider retiring the fleet rather than putting the series through an overhaul, replacing them with 8000-series cars — Metro’s next series model tentatively scheduled to arrive in 2024. Metro is finalizing a contract with Hitachi Rail to build 256 8000-series cars with an option to purchase as many as 800.

Tuesday’s uncoupling and suspension of the 6000-series fleet is the latest challenge for Metro during what has been a difficult fall. In September, the Washington Metrorail Safety Commission released an audit of Metro’s Rail Operations Control Center, calling the transit system’s central nerve command center a “toxic” work environment with deep-rooted safety issues, saying many should have been corrected years ago.

The audit has led to a restructuring of Metro leadership, reprimands from U.S. senators and the hiring of a new rail operations control director. The audit highlighted problems with Metro’s emergency response, pointing out communication problems between the control center, operators and fire rescue services. It also cited close calls Metro has had while restoring third-rail power to tracks after an emergency but before fire personnel and other workers had left danger zones.

On Tuesday, Metro said power to its electrified third-rail was shut down on the Red Line immediately after the uncoupling, allowing firefighters to evacuate passengers and escort them out.

The safety commission said it will measure how Metro performed in the response.

The transit agency is facing a $176 million shortfall in the fiscal year because of plummeting fare revenue amid the coronavirus pandemic. Metro announced last week it was offering buyouts to retirement-eligible employees to cut its workforce by about 1,400 positions and avoid layoffs.