Voting rights were on the ballot in the midterm elections on Tuesday, and voters sent a resoundingly clear message in favor of making elections more accessible and fairer.

In Kansas, Kris Kobach, who championed perhaps the most restrictive voting law in the country and led President Donald Trump’s voter fraud commission, lost the race for Kansas governor to Democrat Laura Kelly.

“Voters took charge of their own elections in many places. The victories for democracy reform in Florida, Michigan, Utah, Maryland, and other places show that voters understand the importance positive voting rights reforms for the future of their elections,” Josh Douglas, a law professor at the University of Kentucky, wrote in an email.

The success of the ballot measures could offer a model for how to expand voting rights for years to come. By putting voting access questions directly to voters, activists can go around state lawmakers hesitant to change election rules and a conservative U.S. Supreme Court.

“It was a huge night for democracy beyond Ds and Rs,” said Michael Li,senior counsel at the Brennan Center for Justice. “These measures passed in states that many doubted they ever could ― and did so on a bipartisan basis. Most importantly, they were genuinely grassroots driven.”

He added: “They show that there’s not one right solution for every state, but that there’s a deep well of democratic” support for voting rights.

“These reforms enacted by these ballot referenda will have impacts for elections to come,” Anthony Romero, executive director of the ACLU, which backed several of the ballot measures, said in a statement.

However, it wasn’t all good news for voting rights on Tuesday.

Democrat Katie Hobbs lost a closely watched secretary of state race in Arizona to Steve Gaynor, a GOP newcomer who said ballots should only be printed in English.

The biggest defeat came in North Carolina, where voters approved a constitutional amendment to require photo ID at the polls. North Carolina Republicans will now get to decide what forms of ID will be accepted before they lose their supermajority in the state legislature. Those details are crucial to determining how easy it will be for North Carolinians to vote.

While they approved the photo ID requirement, however, North Carolinians rejected proposals that would have given lawmakers more power in filling judicial vacancies and appointing officials to the state elections board. Democrats strongly criticized those measures as an attempt to strip power from Gov. Roy Cooper, a Democrat. Democrats also expanded their majority on the state Supreme Court, electing Anita Earls (D), a well-known voting rights lawyer, to replace Republican Barbara Jackson.

But Republican control of the U.S. Senate means that Trump will have at least two more years to appoint conservative judges to the federal bench who are unlikely to support voting rights, said Rick Hasen, a law professor at the University of California, Irvine, who specializes in election law.

“There were some big victories for voting rights, such as Florida’s felon measure and two Michigan voting measures,” Hasen said. “But voter ID won in North Carolina and I expect Republicans’ continued control of the Senate will mean the appointment of more judges likely to uphold restrictive voting laws.”

Douglas also said there was more work to be done to pass voting reforms.

“Gerrymandering still minimized Democratic gains in the House. Some measures ― like Golden, Colorado lowering the voting age ― didn’t pass,” he said. “This shows that voting rights champions need to continue telling the story of the importance of positive changes to our election system.”

This article has been updated to include the passage of automatic voter registration in Nevada, and comments from Michael Li and Anthony Romero.