President Barack Obama said Wednesday he believes that efforts to make it more difficult to vote in the United States are an extension of the legacy of slavery and Jim Crow laws.

“There is an ugly history to that that we should not be shy about talking about,” Obama said during his final news conference. “The reason that we are the only country among advanced countries that makes it harder to vote is, it traces directly back to Jim Crow and the legacy of slavery. It became sort of acceptable to restrict the franchise. That’s not who we are. That shouldn’t be who we are. That’s not when America works best.”

As Republicans across the country push strict voter ID laws in state legislatures, Obama described the notion that there were many incidents of voter fraud as “fake news.”

“Make it easier, not harder. This whole notion of voting fraud, this is something that has constantly been disproved. This is fake news. The notion that there are a whole bunch of people who are going out there and are not eligible to vote and want to vote,” Obama said. “We have the opposite problem. We have a whole bunch of people who are eligible to vote who don’t vote. So the idea that we put in place a whole bunch of barriers to people voting doesn’t making sense.”

President-elect Donald Trump has claimed that millions of Americans voted illegally during the presidential election, a claim that is untrue. A New York Times survey of all 50 states following the November election found very few incidents of voter fraud.

In 2013, the Supreme Court struck down a provision in the Voting Rights Act that required places with a history of racial discrimination to seek clearance from the federal government before making changes to their elections. The decision has opened the door to a number of laws that make it more difficult to vote,

After he leaves the White House, Obama will also be involved in an effort led by former Attorney General Eric Holder to take on redistricting reform and make electoral districts fairer for both parties. Obama said on Wednesday that these unfair “gerrymandered” districts threatened the country.

“Political gerrymandering that makes your vote matter less because politicians have decided you live in a district where everybody votes the same way you do so that these aren’t competitive races and we get 90 percent Democratic districts, 90 percent Republican districts,” he said. “That’s bad for our Democracy, too. I worry about that.”