Rep. Alexandria Ocasio-Cortez expressed her solidarity with the antipolice demonstrations that raged in Brooklyn over the weekend and included turnstile-jumping and defacing cop cars.

“Ending mass incarceration means challenging a system that jails the poor to free the rich,” the first-term Democrat wrote on Twitter on Saturday.

“Arresting people who can’t afford a $2.75 fare makes no one safer and destabilizes our community. New Yorkers know that, they’re not having it, and they’re standing up for each other.”

Hundreds of protesters turned out in the borough to rally against what they call police brutality by the NYPD and a crackdown on subway fare evaders.

The unrest began Thursday, Halloween night, in Brownsville as mobs pelted NYPD squad cars with boxes, trash and eggs, then mocked officers, “Trick or treat, motherf–kers!”

Some police cars were marred with graffiti that read “F–k NYPD.”

The chaos bled into Friday as protesters holding signs that said “F–k the police” and “NYPD KKK” tore through Downtown Brooklyn.

They turned their attention to the subway and an NYPD plan to crack down on fare-beaters.

The lawbreakers then charged the Hoyt-Schemerhorn station en masse and hopped turnstiles as they flipped obscene gestures toward members of New York’s Finest.

One protester was arrested and another was given a summons.

The demonstrations were sparked by a viral video showing police officers trying to break up a fight between teens at the Jay Street-Metro Tech subway station.

A cop is seen in the cellphone video punching one of the teens in the Oct. 25 incident.

Ocasio-Cortez’s response drew criticism from one police union head.

”AOC is a political figure who is popular with other cuckoo people,” Sargent’s Benevolent Association President Ed Mullins said. “People with common sense pay no attention to her.”

Twitter users also blasted the congresswoman’s take.

“New York City is livable precisely because they started enforcing quality of life crimes. Make that was, you criminal-excusing ingrate,” wrote Anthony Bialy.

“A United States representative says if you cannot afford something you should steal and police should not arrest you if it is not expensive,” said user Carmine Sabia.

But user @MisterJRocka backed Ocasio-Cortez, saying: “A lot of people in these comments come from privileged backgrounds and don’t know what it’s like to choose between eating breakfast or paying for fare to ride the MTA.”