Hundreds of anti-cop protesters shut down the Brooklyn Bridge and brought traffic to a crawl in two boroughs Tuesday as part of a nationwide stunt calling for revolution in the wake of the latest police shooting.

More than a 20 people were arrested when protesters stormed the bridge around 4 p.m.; first flooding the pedestrian walkway before part of the mob began clogging up car traffic in both lanes, police said.

Several of the demonstrators snaked their way through traffic chanting things like “F— the police” and likening the NYPD to the “KKK” while drivers honked and shouted back angrily.

“These pigs have blood on their hands — that’s right, it’s time to take a stand,” said Jamel Mims, 28, a member of the New York City Revolution Club — one of the groups who helped to plan the protest. “I call cops pigs, and its an insult to farm animals,” he said, adding that groups from around the country had been planning Tuesday’s chaos for months.

Cops tussled with several protesters on both sides of the bridge; slamming some to the ground before binding their hands with zip ties and loading them into buses.

Two officers suffered minor injuries in the melee — one off-duty sergeant and another officer from the 78th precinct, sources said.

The mayhem started when a group of around 400 protesters gathered near Union Square about 2 p.m., where they began chanting familiar refrains like “I can’t breathe” and “black lives matter.”

City Hall and Police Headquarters were placed on lockdown as the protesters stormed the gates of each building while shouting and performing die-ins.

Additional reporting by Georgett Roberts, Jamie Schram and Amber Sutherland