The Summer of Hell ended the work week with a bang.

A southbound Q train derailed in Brooklyn during Friday morning’s rush, temporarily prompting the complete suspension of the B train in both directions, according to the MTA.

The incident occurred at 8:55 a.m. when the second set of wheels on the second car of the train came off the rails at the Brighton Beach station, MTA spokesman Kevin Ortiz said.

A pregnant woman who was among the 135 passengers aboard the train was hospitalized with a minor injury described as a “back strain,” officials said.

A rescue train was called in and all passengers were safely evacuated and walked from the derailed train through the rescue train to the Sheepshead Bay station platform at the next stop, the MTA said.

“As you can see there is a slight curve in the track here, but from the initial visual impression, there’s no immediate cause that pops up,” MTA CEO Ronnie Hakim said at a press conference.

“Obviously we are sorry that this occurred this morning,” she said.

Due to the derailment, B trains initially were suspended from Bedford Park Boulevard to Brighton Beach in both directions.

By 11:40 a.m., B trains were running from 145th Street to Kings Highway and terminating.

There was no B train service between Kings Highway and Coney Island-Stillwell Avenue.

Southbound Q trains were running on the N line from Atlantic Avenue-Barclays Center to Coney Island-Stillwell Avenue, the MTA said.

The MTA alerted riders in Brooklyn between Kings Highway and Coney Island-Stillwell Avenue to use shuttle buses or B68 buses making nearby station stops.

Nick Sifuentes, deputy director of the Riders Alliance advocacy group, said Friday: “The Summer of Hell is turning into the Summer of Fear.”

“Our ongoing crisis is exactly what happens when the state skimps on decades of transit investment. Riders are scared and angry — and they’re not going to let up on the governor until we have the funding we need to fix our subways,” Sifuentes said.

Brooklyn Borough President Eric Adams said the derailment “should not be shrugged off as just another incident.”

“It is indicative of a creaking mass transit system that needs urgent upgrades to fit the needs of a 21st-century city,” Adams said. “As the ticket of a ride increases ever further, riders cannot be left in the dust, picking up the price tag for a mismanaged system at the seams of a total breakdown.”

The MTA is investigating the incident.

Friday’s subway derailment comes during a time of crisis for the MTA — and follows the derailment of an A train in Harlem last month caused by an unsecured piece of rail line that was left on the tracks.

As many as 34 people were hurt when two cars of the A train derailed at the bustling 125th Street station on June 27.

In recent months, the MTA has been especially plagued by the system’s aging infrastructure.