A judge is ordering Alabama election officials to "preserve all digital ballots" the day before the highly anticipated Senate special election.

Montgomery County Circuit Judge Roman Ashley Shaul issued the injunction on Monday afternoon in response to a lawsuit in which four Alabama voters argued that the state must save the records under state and federal law, Alabama news outlet AL.com reported.

"All counties employing digital ballot scanners in the Dec. 12, 2017 election are hereby ordered to set their voting machines to save all processed images in order to preserve all digital ballot images," Shaul wrote in the order.

ADVERTISEMENT

Tuesday's election pits Republican Roy Moore, who has been accused of sexual misconduct by multiple women, against Democrat Doug Jones in the race to take over the former seat of Attorney General Jeff Sessions Jefferson (Jeff) Beauregard SessionsGOP set to release controversial Biden report Trump's policies on refugees are as simple as ABCs Ocasio-Cortez, Velázquez call for convention to decide Puerto Rico status MORE.

Priscilla Duncan, the attorney who argued on behalf of the voters, praised the decision and said the ruling helps protect the votes in the event of a recount.

"People think that when they mark the ballots and they go into the machine that that's what counted," Duncan told the news outlet in response to the order.

"But it's not, the paper ballot is not what's counted. That ballot is scanned and they destroy [the ballots] after the election," she continued, adding that the decision helps maintain records in case there is "ever an election challenge."

The state will maintain the ballot images for six months under Shaul's order, Duncan said.

The defendants in the lawsuit declined the news outlet's request to comment.

Moore came under fire in the midst of an already heated campaign when multiple women came forward last month and accused him of pursuing sexual or romantic relations with them when they were teenagers and he was in his 30s.

One woman says Moore initiated a sexual encounter with her when she was 14, another says he sexually assaulted her when she was 16.