A hearing is set for 9 a.m. Tuesday in state Superior Court in Somerville, N.J., and could span two days to contest Warren County Sheriff David Gallant's win over Washington Township, N.J., police Chief James McDonald in the June 4 Republican primary, according to McDonald's attorney Thaddeus Maciag.

Gallant topped McDonald by a slim margin in the primary that decided the election. No Democrat is registered to run in the November election.

Maciag said a judge will need to look for three things in the final tally, including whether any illegal votes were cast in which signatures didn't match, any procedural mistakes made by election officials and any party switches the day of the primary.

Although these things can happen in any election, if someone wins by a landslide they usually aren't checked, Maciag said. But when someone wins by 15 votes out of thousands, it's something that should be checked out, he said.

There are about 50 votes being challenged due to the three factors that could determine who won the primary, Maciag said, adding that either candidate could pick up or lose votes.

If that happens, the judge could either declare a winner based on any votes that were switched or call for a new vote altogether, which would decide the winner, Maciag said.

"Both sides are hoping a for a clear-cut decision that their candidate wins," he said.

On June 19, both candidates met with election officials to perform a recount of all active voting machine ballots and then again the following week for all paper-based ballots.