A transgender woman with dozens of prior arrests is in custody for a two-day, two-borough binge of pepper-spray ambushes on 11 unsuspecting strangers, allegedly fueled by anti-white bias, cops said Sunday.

Thomas Heard — whom a police source said identifies as a woman, and neighbors said sometimes goes by “Tasha” — kicked off her latest alleged attack by approaching a couple outside her Bronx apartment building Saturday and demanding to know the woman’s race, cops said.

“Are you white?” Heard, who is black, allegedly barked at the 23-year-old woman, before kicking her and threatening her with a sharp object, and dousing her 30-year-old boyfriend with pepper spray, cops said.

Cops said they caught up with Heard — who was packing a pair of scissors and a canister of capsaicin — shortly after the 4:40 p.m. run-in near East 187th Street and Crotona Avenue, bringing an end to an alleged spraying spree that began around noon Friday in upper Manhattan.

Heard, 37, first sprayed a 29-year-old man inside the West 125th Street 2- and 3-train station at around 11:50 a.m. Friday, then dashed out to the street, police said.

Running west along 125th Street, Heard spritzed four women and another man, ranging in age from 23 to 48, according to authorities.

She then ducked into the 1-train station at West 96th Street and at Broadway around 1 p.m., and sprayed another straphanger, a 30-year-old woman, in the face, authorities said.

Later Friday, in The Bronx, she allegedly unleashed the debilitating mist on a 55-year-old man, and kicked a 56-year-old woman in the shins on East 187th Street, cops said.

“Crazy f–king white b—h!” Heard allegedly yelled at the female victim as she chased her down the street. “I hate you!”

Two of the Manhattan victims were treated at a hospital, but no one was seriously injured, authorities said.

Throughout the Friday rampage, police said Heard repeatedly made anti-white remarks — an allegation that came as no surprise to her Belmont neighbors.

“She hated white people,” said one man, who said he didn’t believe Heard is a racist but rather took a downward spiral once she started seeing a new boyfriend within the past year. “She would stand on that corner and scream it.”

Another neighbor added, “She’ll just talk to herself, ranting, ‘White people are privileged and you have to bow down to them.’ She would come by, like, ‘These motherf–kers think you owe them something.’

“She must have some trauma associated with white people,” the female neighbor said. “You never know what goes on in someone’s mind.”

Both neighbors declined to give their names, saying they were afraid of reprisal from Heard, who was arraigned early Monday and held on $30,000 bond.

Police sources said Heard has 65 prior arrests, many for prostitution, along with collars for assaulting a police officer, grand larceny and fraud. She is facing charges of assault, menacing and harassment as a hate crime for the Bronx incidents.

She was awaiting arraignment Sunday on charges of assault, menacing and harassment as a hate crime for the Bronx incidents, before being processed on the Manhattan crimes.

Additional reporting by Tina Moore and Larry Celona