Tech-savvy anarchists ran rings around the NYPD during last week’s Ferguson-related protests — and cops are now on edge over what the renegades may be able to pull off after a ruling in the Eric Garner case.

The NYPD is “very concerned, more because of recent events,” a law enforcement source said.

Last week, activists armed with untraceable “burner phones” used social media and online bulletin boards to stay one step ahead of city cops and create mayhem after a grand jury cleared Officer Darren Wilson in the fatal shooting of Michael Brown in Ferguson, Missouri.

The anarchists clearly won the game of “Whac-A-Mole’’ — shutting down major roads including the FDR Drive, Lincoln Tunnel and West Side Highway and frustrating the NYPD, sources said.

“They wore me out,” said one counterterror expert who monitored the protests. “Their ability to strategize on the fly is something we haven’t dealt with before to this degree.”

While the NYPD actively monitors Twitter, Facebook and other social media for intelligence, sources said the official chain of command keeps squadrons of cops from moving around as quickly as protesters.

A “technology gap” also favors the activists, many of whom have the newest electronic gear, sources said.

“A lot of these anarchists are from the Occupy Wall Street group. They are little rich kids, little techie brats,’’ a source said.

“They get their money from Mommy and Daddy. And they travel from the West Coast to the East Coast and everywhere in between to disrupt events that involve corporate America, world summits, civil rights and especially those that involve law enforcement.”

“They have their little MacBook Air computers, their Wi-Fi, their smartphones, and they’re off to the races. We’re reacting to these situations, which means we are not fully in control of them,” the source said.

Authorities suspect “a few hundred” of the estimated 4,000 protesters who took to New York City’s streets after the Ferguson decision used their knack for mobile technology to send out real-time advisories on where cops were located and where they were headed.

“They were giving instantaneous commands to their followers, and this enabled them to stay one step ahead of us,” a source noted.

As a result, cops were left to race around the city to try to stem the disruptions.

The developments now have cops “very worried” about the upcoming ruling by a grand jury investigating Garner’s death, sources said.

The Staten Island dad died in August after being put in a police chokehold while being busted for allegedly peddling loose cigarettes.

NYPD Officer Daniel Pantaleo — who was recorded putting Garner into the chokehold — testified before the panel Nov. 21, and a ruling on whether to indict him could be announced as soon as Monday.

“We’re expecting strong reaction and demonstrations when the decision comes down,” one source said.

Another source said: “The cops on standby will be in riot gear. That means helmets and sticks.”

Since the success of Twitter and Facebook in fueling the Arab Spring uprisings that toppled regimes in Egypt, Libya and Tunisia, US activists have increasingly used the Web to organize and mobilize protests.

Last week, hundreds of tweets directed protesters to Union Square to await the Ferguson ruling.

After the verdict, NYPD Commissioner Bill Bratton was splattered with fake blood, allegedly by “professional agitator’’ Diego Ibañez, 26.

Plans to disrupt the Macy’s Thanksgiving Day Parade included the Twitter hashtag #StopTheParade.

And activist Ben Norton — busted in July during a protest in DC with the CODEPINK anti-war group — tweeted out a parade map.

“This is the route,” he wrote. “Be the change you want to see in the world. Make history. #IndictTheSystem.”