B train service has been restored following a suspension along the entire line Wednesday afternoon, the MTA said.

The line was suspended from 145th Street in Manhattan to Brighton Beach in Brooklyn for about 40 minutes, the agency said. The B and Q lines are currently running with delays.

The shutdown was due to a rail condition at Prospect Park.

The MTA urged riders to allow extra travel time.