A federal judge on Thursday ordered Georgia to temporarily reopen voter registration ahead of a hotly contested congressional runoff in the 6th District.

U.S. District Judge Timothy Batten made the ruling as part of a broader lawsuit by a Washington-based advocacy group, which last month accused Georgia of violating federal law by reducing the amount of time residents have to register to vote.

Voter registration shut down March 20 ahead of the deciding runoff June 20 for the 6th District election, which is being held in the northern suburbs of metro Atlanta.

Batten, however, ordered registration immediately reopened until May 21.

A spokeswoman for Georgia Secretary of State Brian Kemp said the office will seek to comply with the order.

"Brian Kemp swore an oath to uphold and defend Georgia law," spokeswoman Candice Broce said. "That is what he did, and that is what he will continue to do.”

The suit, filed by The Lawyers' Committee for Civil Rights Under Law on behalf of five civil rights and voting rights organizations, claims Georgia law cuts off voter registration for federal runoff elections two months earlier than it should be allowed to.

Kemp’s office, which oversees elections in Georgia, has called the suit a political effort by liberal groups to attack him as a Republican officeholder.

The office has also noted that the law has been in place since Democrat Cathy Cox was secretary of state more than a decade ago.

Batten, who was appointed to the federal court bench by President George W. Bush, held the hearing Thursday in Atlanta after the groups’ asked for an emergency injunction.

The 6th District raced has become a nationally watched barometer on the early effect of Donald Trump’s presidency, with Democrats making a run at what has been considered solidly GOP area.

Democrat Jon Ossoff among a field of 18 candidates won 48 percent of the vote April 18, falling short of the necessary 50 percent to claim victory outright.

He now faces Republican Karen Handel, a former secretary of state who has made an effort to consolidate GOP support and got a fundraising visit last week from Trump.

It is unclear whether reopening registration will have a tangible effect on the runoff’s outcome.

That tied for the fourth-lowest increase among Georgia’s 14 congressional districts in new registrations since then.

Tom Price’s congressional seat is vacant since he accepted a position in the Trump administration.