A Brooklyn subway rider sprawled out over several seats got so angry when he was asked to share the space that he fired off pepper spray in the crowded car Thursday — causing a panic and snarling service at the height of rush hour, sources told The Post.

Commuters found the man — identified by police sources as 24-year-old David Dennis — hogging multiple seats on the Manhattan-bound A train pulling into the High Street station around 8:15 a.m., sources said.

When they asked Dennis to sit up and make room for other riders, he whipped out a can of pepper spray and blasted one female straphanger in the face, according to sources.

The train was held at High Street, where Dennis was taken into custody by transit police.

Charges against him are pending.

The woman who was pepper-sprayed was treated at the scene, while another man who was shoved during the ensuing chaos declined medical attention.

The rest of the straphangers were ushered off the train, which the NYPD ordered held in the station for the next 90 minutes while detectives investigated, MTA sources said.

“A fight between customers occurred on a northbound A train this morning around 8:17 a.m.,” the MTA tweeted. “Because weapons were involved, NYPD determined High St Station a crime scene.”

As the train sat in the station, A and C trains were re-routed over the F line.

This, in turn, re-routed some F trains along the G line, and incensed inconvenienced straphangers.

“If A and C trains were rerouted, why did we sit in the tunnel between stations for 35 (!!) minutes with no clear announcements?” fumed Twitter user @anjiezheng.