Gov. Cuomo swooped into Times Square “like Batman” minutes after Thursday’s fatal rampage there, irking NYPD brass.

“The governor was there almost instantaneously. It was outrageous,” a senior law-enforcement source said. “He was there like Batman. He might as well have taken off his shirt and gone around investigating.”

Just a half-hour after the attack, Cuomo tweeted, “I am en route to the incident in Times Square.”

He had just finished an event on East 27th Street.

Twitter photos show he arrived by 12:34 p.m., before Mayor de Blasio and top NYPD officials.

“He beat everyone from the Police Department to sit there and look like he was in charge. It seemed like it was a publicity stunt,” the source said.

Cuomo tweeted a photo of himself “getting briefed by the NYPD,” and images posted by his secretary, Melissa DeRosa, show him shaking NYPD Commissioner James O’Neill’s hand at 12:39 p.m. and talking to victims.

He left after about 20 minutes, but state troopers stayed in the area for the rest of the afternoon.

“They’re just swooping in, sitting in the sidelines and looking pretty,” the source said.

Cuomo’s office fired back at critics Saturday.

“It’s disgusting they would politicize this tragedy,” spokesman Rich Azzopardi said, noting Cuomo never spoke to the press.

State Police spokesman Beau Duffy said, “Troopers were stationed at nearby transportation hubs and responded to an emergency just as any law-enforcement professional is trained to do.”

“New York City police officers work effectively side-by-side with New York State Troopers and other state law enforcement on a daily basis, in all kinds of situations,”said Patrolmen’s Benevolent Association president Patrick J Lynch.

“The Governor has a role to play in any emergency situation in New York State, and he has been a strong supporter of helping New York City police officers do our jobs,” Lynch said.

“We should be praising our elected leaders for being proactive in a crisis, not the other way around.”