Every week, Democratic Gov. Terry McAuliffe of Virginia sits in his office in Richmond for a few hours with a stack of papers and reads the names of convicted felons.

The governor, a close friend of Hillary and Bill Clinton, checks that they have all served their time and that none is on parole. Then his staff rush out and send thousands of letters with the governor’s seal and the news: Your right to vote has been restored. Governor’s orders.

As of late September, McAuliffe’s had re-enfranchised some 59,000 ex-felons, his office said. Many of them lean Democratic and could help tip the scales for Clinton in the key swing state of Virginia in November.

For this, the governor has earned the scorn of Republicans, the scrutiny of the state supreme court, and the praise of civil rights groups who say his executive orders are only fair to ex-felons who have served their time.

“Proud of my friend,” Clinton tweeted when McAuliffe first announced his plan, “for continuing to break down barriers to voting.”

McAuliffe’s executive orders are just one part of a new wave of voting rules that could help Clinton get elected in November. Much scrutiny has fallen on Republicans in the past five years for pushing restrictive new voting laws in state legislatures, but Democrats’ efforts to expand the vote to young voters and African Americans may have a more decisive effect on the 2016 election.

At the vanguard of this effort is a team of top Democratic attorneys and strategists working on an unprecedented countrywide effort to expand its voter base to improve Clinton’s odds in November against Trump. They are relying on a variety of legal tools to increase voting hours and ensure there are enough polling sites at convenient locations, focusing on swing states including North Carolina, Florida and Ohio.

In many cases, voting locations and days are being decided by minuscule details in state and county law, hashed out over phone calls, closed-door meetings and forcefully written legal memos. Court decisions and meetings with county officials can prove decisive. By the Democratic Party’s count, 25 states have expanded voting this election cycle since 2012. The goal is clear: to make sure as many Democrats vote in November as possible.

“It’s been clear that Republican efforts have tried to limit access to voting since 2012,” said Marlon Marshall, states director for Clinton’s campaign. “I would say that our efforts by Democrats across the country have in many cases expanded access to voting.”

Nationally, Republicans have been largely absent during these efforts, even while at the local level some have protested Democrats’ efforts as politically motivated. A spokesperson at the Republican National Committee declined to comment.

In North Carolina, a key swing state, teams of lawyers are going county-by-county to add early voting days, pressuring supervisors of elections to include additional days and polling sites. In predominantly Democratic Wake County, home to the state capital of Raleigh, early voting hours have been expanded by 50%. In the blue counties that are home to Charlotte and Fayetteville, the Clinton campaign has bargained for similarly increased hours.

In Florida, Miami-Dade, the biggest liberal base in the state, has expanded its early voting sites from around 20 in 2012 to 30 this year, due to the Clinton campaigns efforts. Broward, Orange and Hillsborough counties—home to Fort Lauderdale, Orlando and Tampa—have also expanded early voting hours. In the state where Al Gore lost to George W. Bush by a mere 500 votes, a day of extra voting at one polling place could swing the election if it ends up similarly close.

In Minnesota, Democrats have won no-excuse early in-person and mail voting. In North Carolina and Wisconsin, Democratic lawyers have beaten back laws requiring voters to carry IDs, while they’ve sought to reinstitute a week when voters could register and vote early at the same time in Ohio.

The efforts by Clinton and the Democratic Party are intended to expand the vote broadly, but in particular to likely Clinton voters in must-win states. They began in the last couple years as a pushback against Republican efforts to restrict voting options, but sometimes Democrats are going further than what civil rights groups recommend.

“We like the map. We like the rules that are in place. Have we won every fight? No,” said Pratt Wiley, the Democrats’ national director of voter expansion. “But in the long term we are absolutely moving in the right direction.”

The mastermind of the Democratic efforts is a bullish Washington attorney, Marc Elias, who has aggressively challenged voter ID laws and curtailed voting in the states. Teams of lawyers jointly under the direction of the Clinton campaign, Elias and the party are responsible for knowing the ins-and-outs of each state’s election laws. He counts among his clients the Democratic National Committee and various arms of the, several Democratic super PACs including the Clinton-supporting Priorities USA, as well as the Clinton campaign itself. George Soros, the billionaire investor, has given $5 million to a trust that funds Elias’ litigation.

In North Carolina, Elias, the NAACP and other groups jointly brought down a state voter ID law in a federal appeals court in July. After the law was invalidated, each individual county was required to redraw all their early voting schedules and location plans. The Democrats got to work, engineering favorable polling hours and locations on a county-by-county level.

The 33 counties that could not agree on their early voting schedule sent their elections board members to meeting in the state capitol to hash out an agreement mediated by the state in September. The local Democratic elections board members came with a team of nearly a dozen attorneys; the Republican officials had none. The meeting to decide the early voting hours in the state, normally a subdued affair attended by little-known local elections officials, turned into a 12-hour marathon.

“These had been perfunctory processes in the past,” said Josh Lawson, general counsel for the North Carolina state board of elections. “This was the first time we had multiple lawyers representing county board of elections members.”

When three Democratic-leaning counties, Granville, Guilford and Forsyth did not end up with as many voting locations as Elias wanted, he teamed up with the NAACP and sent a lengthy letter to North Carolina’s board of elections in Raleigh arguing for more voting days.

The final results will strongly favor Clinton: there will be about 20% more early voting hours in North Carolina than in the 2012 general election, according to an estimate provided by the state.

Democrats have explained their efforts as a high-minded attempt to expand the vote. But their work will likely be rewarded by increasing turnout among their favored constituents.

“Both parties are clearly trying to do what they can do to help their voters vote and help their side win,” said Dan Tokaji, a professor at Ohio State University’s Moritz College of Law who was a co-counsel in a lawsuit against Ohio to end purges of voters from registration rolls. “That’s the agenda of political campaigns.”

Democrats in some cases go beyond what civil rights groups have recommended. Elias sued the state of Ohio after the American Civil Liberties Union settled a case there over early voting. Elias’ team lost its bid to re-institute “Golden Week,” a week of early voting and registration.

Some of the most restrictive voting measures have been put in place in red states like Texas, Alabama and Kansas, but Democrats are holding their fire in those states. Instead they are handpicking their battles in swing states and blue counties.

In Virginia, there is no evidence that McAuliffe’s decision to restore felons’ right to vote is part of a conscious Clinton campaign effort to win the state in November, and his office said the governor’s decision was made out of fairness, not as part of an electoral strategy. (Virginia is one of just nine states that do not automatically restore voting rights to felons after they have completed their sentence and parole.)

But the governor’s weekly sessions in his office could have an outsized effect on voting in the state, nonetheless. Nearly half of the state’s former felons are African American, and research in New York, North Carolina and New Mexico has shown that they overwhelmingly register as Democrats.

After a Republican challenge, state’s supreme court ruled in July that McAuliffe’s initial proposal—a blanket restoration of the state’s 200,000 ex-felon’s rights—was unconstitutional. The court OK’ed McAuliffe’s decision to sign off on restoring the ex-felon’s vote one-by-one, however.

Republicans have accused him of rigging the vote in favor of Clinton.

“The singular purpose of Terry McAuliffe’s governorship is to elect Hillary Clinton President of the United States,” said Bill Howell, speaker for the state’s House of Delegates in a statement. “It is hard to describe how transparent the Governor’s motives are.”

Leah Aden, senior counsel for the NAACP Legal Defense Fund, called McAuliffe’s restoration of voting rights “courageous.”

“This is a key civil rights issue, that more than 5 million in our country can’t vote because of a felony conviction,” Aden said. “What’s amazing about these laws is that the governor has to resort to doing what he did.”

Whatever the outcome in November, McAuliffe is not making it hard for ex-felons. After the governor reviews the thousands of cases each week, his staff tucks away special paperwork that accompanies every letter to the newly eligible voters: a voter registration form.

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.