ATLANTA — A federal judge has ordered Georgia take steps to ensure provisional ballots aren't improperly rejected and to wait until Friday to certify the results of the midterm elections that include an unsettled race for governor.

In a ruling late Monday, U.S. District Judge Amy Totenberg ordered the secretary of state's office to establish and publicize a hotline or website where voters can check whether their provisional ballots were counted and, if not, the reason why. And, for counties with 100 or more provisional ballots, she ordered the secretary of state's office to review, or have county election officials review, the eligibility of voters who had to cast a provisional ballot because of registration issues.

Totenberg also ruled that Georgia must not certify the election results before Friday at 5 p.m., which falls before the Nov. 20 deadline set by state law.

State elections director Chris Harvey testified at a hearing last week that the state had planned to certify the election results on Wednesday, a day after the deadline for counties to certify their results. He said that would allow preparations to begin for any necessary runoff contests, including one already projected in the race for the next secretary of state.

Current unofficial returns show Republican Brian Kemp leading by a margin that would make him the governor-elect. But Democrat Stacey Abrams insists that enough outstanding votes remain to be counted that could pull Kemp below the majority threshold and force a Dec. 4 runoff.

Totenberg acted in response to a lawsuit filed Nov. 5 by Common Cause Georgia. The suit accuses Kemp, the state's top elections official until he resigned as secretary of state last week, of acting recklessly after a vulnerability in Georgia's voter registration database was exposed shortly before the election.

Kemp's actions increased the risk that eligible voters could be illegally removed from the voter registration database or have registration information illegally altered, the lawsuit says.

Sara Henderson, executive director of Common Cause Georgia, said in an emailed statement that the ruling helps increase voter confidence in elections.

The secretary of state's office was reviewing the order and considering its options, spokeswoman Candice Broce said in an email.

Totenberg's order doesn't change the Tuesday deadline for counties to certify their results. But Abrams' campaign filed a lawsuit Sunday asking a federal court to push that deadline to Wednesday, while also requiring that elections authorities count certain provisional and absentee ballots that have been or would be rejected for "arbitrary reasons."

"I am fighting to make sure our democracy works for and represents everyone who has ever put their faith in it. I am fighting for every Georgian who cast a ballot with the promise that their vote would count," Abrams said in a statement explaining her refusal to end her bid to become the first black woman elected governor in American history.

Kemp's campaign retorted that Abrams' latest effort is "a disgrace to democracy" and ignores mathematical realities.

"Clearly, Stacey Abrams isn't ready for her 15 minutes of fame to end," said Kemp spokesman Ryan Mahoney.

As of Monday evening, a hearing had not been scheduled for arguments in the case, but Abrams' campaign was expecting a federal court in Atlanta to set a Tuesday hearing, given the time sensitivity.

Unofficial returns show Kemp with a lead of about 60,000 votes out of more than 3.9 million cast; Abrams would need a net gain of about 21,000 votes to force a Dec. 4 runoff. NBC has rated the race too close to call at this time.

The Georgia race, along with Florida's gubernatorial and Senate matchups that are requiring recounts, are among the final measures of a midterm election cycle that already has allowed Democrats to deal serious blows to President Donald Trump.

Democrats already have won the House, flipped seven governor's seats and reclaimed more than 300 state legislative seats in statehouses around the country. The GOP maintained its Senate majority, and could still expand it. But it's looking to hold the governor's mansions in Florida and Georgia to deny Democrats important gains in presidential battlegrounds ahead of the 2020 election.

Republicans have been governor in Georgia since 2003 and in Florida since 1999, and Trump has put a premium on the two states, endorsing both Kemp and Florida's GOP nominee Ron DeSantis when they were in competitive GOP primaries and then campaigning in person for them ahead of the Nov. 6 election.

Georgia's interim Secretary of State Robyn Crittenden on Monday directed county officials to count some provisional ballots that had been rejected because of voters' failure to provide their year of birth, provided the voter's identity and eligibility was still established.

The Atlanta Journal-Constitution reported that the State Election Board asked Crittenden to send a letter instructing county election officials how to handle absentee ballots.

Republican Gov. Nathan Deal appointed Crittenden to replace Kemp, who resigned last week after declaring victory in the governor's race. He called his margin — 50.3 percent of the vote — "clear and convincing," but said he wanted Georgians to have confidence in the certification process.

Crittenden's directive was in line with one form of relief sought by the Abrams campaign lawsuit but rejected another.

When casting absentee ballots, voters have to sign an oath and have to write their address and year of birth. The lawsuit asked the judge to order that county election officials accept any absentee ballots on which there was missing or insufficient oath information as long as that doesn't "substantially obstruct" officials from verifying the absentee voter's identity.

The lawsuit says that at least 1,095 qualified voters who cast absentee ballots in Gwinnett County had them "arbitrarily and unlawfully rejected" because of missing or insufficient information.

Under Georgia law, any issues causing a voter to cast a provisional ballot must be remedied within three days of the election — Nov. 9 for this election. The lawsuit asks that county election officials be required to consider evidence proving eligibility through Wednesday at 5 p.m.

Crittenden's guidance to the counties noted that the Nov. 9 deadline for verifying the eligibility of provisional ballots was set by state law.

The lawsuit also asked that provisional ballots cast by a voter registered in another county be counted as if the voter had shown up at the wrong precinct. The lawsuit says that of the 1,556 provisional ballots Fulton County reported having rejected by Nov. 9, nearly 1,000 were disqualified because they were cast by voters whose registration records showed them registered in another county.

Further, the Abrams' campaign is asking that any of the court's orders in the case be applied retroactively to counties that already have certified their returns, meaning those counties would have to reopen their counting process using any new standards and then submit updated returns to the state.