Republican presidential nominee Donald Trump has been widely criticized by mainstream media for warning of voter fraud and “rigged” elections, but a video of then-senator Barack Obama campaigning in 2008 shows him acknowledging that voter fraud occurs.

“I would just like to know what you can say to reassure us that this election will not be rigged or stolen?” a woman asks then Illinois Senator Obama at a campaign rally at Kent State University in New Philadelphia, Ohio. The crowd responded to her question with applause.

WATCH:

“Well, I tell you what, it helps in Ohio that we got Democrats in charge of the machines,” replied Obama.

Obama said that he wanted to be “honest” and told the crowd that both Republicans and Democrats commit voter fraud.

“But look, I come from Chicago, so, so I want to be honest. It’s not as if it’s just Republicans who have monkeyed around with elections in the past. Sometimes Democrats have, too,” Obama said. “Whenever people are in power they’re, you know, they have this tendency to try to, you know, tilt things in their direction.”

Obama went on to advocate for a voting rights division in the Justice Department that is non-partisan. He said he would be interested in such a government group that will make sure “people aren’t being discouraged to vote,” investigates “cases of vote fraud” and points to the Voting Rights legislation.

“I wanna make sure that our democracy is working the way it should be,” he said. He spoke of practicing voting rights law during his time as a lawyer and filing lawsuits. He said he worked to make sure people could get registered at driver’s license facilities in Illinois: “The more people participate, the more they are paying attention and ultimately the better off everybody is.”

Republican presidential and vice presidential nominees Donald Trump and Indiana Gov. Mike Pence have been similarly advocating for Americans to get involved in ensuring the integrity of the vote as they hold rallies around the country.

Mainstream media outlets have assailed Trump over suggesting that elections are “rigged” and voter fraud is an issue. CNN reports that “Donald Trump is playing with fire” and that “claim that the election is being rigged against him represents the most outlandish moment yet in a campaign devoted to dismantling political norms.” The headline of the piece calls Trump’s claim “so dangerous” and the body of it warned that “experts” said such claims “could inflict long-standing damage on the U.S. political system.” A Washington Post article surmises Trump supporters were “left issuing broad conspiracy theories about fraud, in much the same way they issue broad conspiracy theories about the polls.”

This report came despite the fact that Obama acknowledged voter fraud issues during his 2008 presidential campaign and encouraged people to “participate.”

Follow Michelle Moons on Twitter: @MichelleDiana