The NYPD has transferred a Brooklyn police captain after he was captured on video bad-mouthing Mayor Zohran Mamdani and Democrats, a department spokesperson said.

The officer, Capt. James Wilson, was captured criticizing the mayor while on the scene of an anti-immigration enforcement protest in Bushwick on Saturday night. Police responded to demonstrators as they attempted to block immigration authorities from leaving a hospital in the neighborhood.

Wilson was transferred on Monday to the department’s communications division at a 911 call center in the Bronx, an NYPD spokesperson said. Department policy prohibits officers from publicly expressing personal views about a political party while they are on duty, the spokesperson added. His disciplinary process is ongoing, the spokesperson said.

A widely shared video shows Wilson speaking briefly with members of the crowd that had gathered outside the Wyckoff Heights Medical Center to confront ICE agents.

Members of the crowd asked Wilson about his thoughts on Mamdani and the officer responded with disparaging remarks about the mayor.

“He’s nonsense,” Wilson said about Mamdani, according to the video.

“He’s, you know, like temporary,” he said. “Not my boss.”

Wilson added about the mayor: “He’s an embarrassment and total nonsense.”

The footage shows the captain appearing to smile as he speaks with demonstrators. During the exchange, he added: “All Democrats: a waste of human race.”

A message left at a number listed for Wilson was not returned.

Saturday's protest formed outside of the medical center after word spread in Bushwick that a man who had been arrested by ICE agents earlier that day had been brought there.

The NYPD responded to a number of 911 calls about a large and disorderly group outside of the building and worked to disperse the crowd, a department spokesperson said.

Officers took a total of nine people into custody at the protest, eight of whom were arrested on a variety of charges, according to the spokesperson. One person was given a summons and released.

In other videos taken at the demonstration, an NYPD officer is seen throwing a demonstrator to the ground.

At a press conference on Monday, Mamdani called the video of the officer throwing the man to the ground “incredibly disturbing” and added that the incident is being investigated.

Mamdani said he had not seen the video of Wilson disparaging him, but said he would follow up. A City Hall spokesperson declined to comment about Wilson's transfer Tuesday.

This story has been updated to include additional comment from an NYPD spokesperson.