Georgia is preparing to tally about 5 million votes in the presidential election for a third time as the FBI and GBI investigate threats against some state election officials.

On Saturday, President Donald Trump’s campaign filed a petition for the recount, which he is entitled to do under Georgia law because Joe Biden’s margin of victory is less than half a percent.

“Today, the Trump campaign filed a petition for recount in Georgia,” the campaign said in the statement announcing the petition. “We are focused on ensuring that every aspect of Georgia state law and the U.S. Constitution are followed so that every legal vote is counted.”

Meanwhile, the hotly contested election apparently has inspired threats against some Georgia officials. On Saturday, Gabriel Sterling, the state’s voting system manager, said on Twitter that he had received threats that prompted police protection around his home. He also cited “multiple attempted hacks of my emails.”

On Sunday, Deputy Secretary of State Jordan Fuchs said the FBI and the GBI are investigating threats to Georgia Secretary of State Brad Raffensperger and his team. She said she could not provide details.

Trump’s request for a recount came a day after Raffensperger and Gov. Brian Kemp certified Biden’s victory. Biden won Georgia by more than 12,000 votes — a margin confirmed in an audit in which every ballot was recounted by hand. The hand recount showed small differences from the original machine count, which election officials said they expected.

Trump has blasted Kemp and Raffensperger on Twitter, writing that another review of voter signatures on absentee ballot envelopes could have found “illegal ballots.”

County election officials verify voter signatures on absentee ballot envelopes by comparing them to the signatures that voters used when they registered. But after that, the ballots are separated from the envelope containing the signature.

The goal of that practice is to protect the secrecy of voters’ ballots — secrecy guaranteed by the Georgia Constitution. Once the ballots are separated from the envelope, it’s impossible to match ballots back to voters to check their signatures again.

On Saturday, Trump’s campaign continued to make unsubstantiated claims that Georgia’s official results are tainted.

“Let’s stop giving the people false results,” the campaign said. “There must be a time when we stop counting illegal ballots. Hopefully it is coming soon.”

On Sunday, the Georgia Republican Party expressed “grave concerns” over the signature verification process and called for an audit of signature matches on absentee ballots. Republican Sens. Kelly Loeffler and David Perdue released statements supporting Trump’s request for a recount that includes signature matching.

“Anything less than that will not be a full and transparent recount,” Perdue said.

Such claims have not held up to legal scrutiny. On Thursday evening, a federal judge rejected a request to bar state officials from certifying the election. Among the claims made in the lawsuit brought by L. Lin Wood, an Atlanta attorney and Trump supporter, is that signature matching was not done properly. The judge said he found no evidence of irregularities that affected more than a nominal number of votes.

Raffensperger has repeatedly defended the integrity of the election in Georgia. On Saturday, in an opinion piece published by The Washington Post, he said the state’s election system “has never been more secure or trustworthy.”

“The successful November election and the smooth hand recount have proved our critics wrong,” Raffensperger wrote.

Unlike the recent audit, the latest recount will not be conducted by hand. Instead, ballots will be scanned and tallied by machine.

The recount is expected to begin this week. It’s unclear how long it will take to complete. The recount will be paid for by Georgia taxpayers.

“We are awaiting details from the Georgia secretary of state to fully outline our timeline, staffing plans and other details pertaining to the requested recount,” DeKalb County elections director Erica Hamilton said. “We do not have an estimate of the cost at this time but will continue to maintain costs associated with this specific effort.”

Biden campaign spokeswoman Jaclyn Rothenberg said a recount “will simply reaffirm Joe Biden’s victory in Georgia a third time.”

“Last week’s recount reaffirmed what we already knew: Georgia voters selected Joe Biden to be their next president,” Rothenberg said. “As the secretary of state said, there is no reason to believe there are widespread errors or fraud and the Trump campaign has no evidence to back up their baseless claims.”

Staff writers Greg Bluestein. Tyler Estep and Jennifer Peebles contributed to this article.