A Democratic operative working to support Hillary Clinton’s campaign was canned Tuesday after an undercover video emerged showing him bragging about hiring homeless people and the mentally ill to disrupt Donald Trump’s rallies.

The video — released after a year-long investigation by the conservative group Project Veritas — shows Scott Foval, formerly of the Americans United for Change, explaining the dirty tricks.

“They’re starting confrontations in the line, right?” Foval said in the video.

“They’re not starting confrontations in the rally. Because once they’re inside the rally, they’re under Secret Service control. When they’re outside the rally, the media will cover it no matter where it happens. The key is initiating the conflict by having leading conversations with people who are naturally psychotic,” he added.

Foval, the national field director for the group — was fired not long after the 16-minute video went online.

“Americans United for Change has always operated according to the highest ethical and legal standards,” group president Brad Woodhouse said in a statement to Fox News.

“Scott Foval is no longer associated with Americans United for Change.”

Foval, who used to work for the George Soros-funded People for the American Way, according to The Washington Times, is quoted at length in the video.

Robert Creamer, founder of Democracy Advocates, also quit the campaign Tuesday for his role in the disruptions.

Another activist, Zulema Rodriguez, told O’Keefe’s investigators, “I just had a call today with the campaign and the DNC. Every day at 1 o’clock.”

She took credit for being involved with a pair of anti-Trump events in March: the Chicago rally and another in Arizona in which anti-Trump protesters blocked a highway.

On Thursday, she complained that the video was selectively edited but added she was proud of her work to support Clinton and battle Trump.

“I was surreptitiously recorded by infiltrators working for propaganda artist James O’Keefe and Project Veritas. It should be noted that multiple operatives involved in his entrapment scheme are current or former Breitbart News employees, the same Breitbart News helmed by Trump campaign CEO Stephen Bannon,” she said in a statement to The Post.

“My comments were taken out of context and selectively edited. What was omitted and what I constantly repeated to the infiltrators was that my team and I work together to make sure everyone stays safe while exercising their rights. I believe this to my core.”

Foval’s paid agitators — who also included union members — were behind a violent protest in Chicago in March that forced Trump to cancel a rally.

“I mean, honestly, it’s not hard to get some of these assholes to pop off,” Foval said.

“It’s a matter of showing up, to want to get into the rally, in a Planned Parenthood T-shirt. Or, ‘Trump is a Nazi,’ you know. You can message to draw them out, and draw them to punch you.”

Another pro-Hillary operator, Aaron Black, who called himself “deputy rapid response director for the DNC for all things Trump on the ground,” said his work was supposed to remain secret.

“Nobody’s really supposed to know about me. So the Chicago protest, when they shut all that, that was us. None of this is supposed to come back to us because we want it coming from people; we don’t want it to come from the party.”

He explained that the intent was to make the disruptions appear spontaneous.

“But if I’m in there coordinating with all the groups on the ground and sort of playing field general but they are the ones talking to the cameras, then it’s actually people, but if we send out press advisories with DNC on them and Clinton campaign, it just doesn’t have the same effect,” Black said.

Foval outlined his ties to the DNC and Clinton campaign.

“We are contracted directly with the DNC and the campaign both. I answer to the head of special events for the DNC and the head of special events and political for the campaign,” he said.

“The campaign pays DNC, DNC pays Democracy Partners, Democracy Partners pays the Foval Group, the Foval Group goes and executes the [expletive] on the ground.”

Foval goes on to say that, “Over the last 20 years. I’ve paid off a few homeless guys to do some crazy stuff, and I’ve also taken them for dinner and I’ve also made sure they had a hotel and a shower and I’ve put them in a program. I’ve done that.”

James O’Keefe, who heads up Project Veritas, said the video showed “compelling evidence of a dark money conspiracy,” and that more undercover videos would also be released.

Neither the Clinton campaign nor Team Trump immediately responded to a request for comment.