SAN FRANCISCO (AP) – A judge in Sacramento ordered the secretary of state’s office on Thursday to add about 5,000 signatures to the 614,326 submitted by supporters of a proposed voter referendum that seeks to overturn a new California law guaranteeing certain rights to transgender students in public schools.

Sacramento County Superior Court Judge Allen Sumner issued a tentative ruling directing Secretary of State Debra Bowen to “accept, file, and process as timely” the qualifying petitions the referendum’s backers circulated in Mono and Tulare counties during the 90 days they had to collect signatures. Bowen’s office had refused to tally them, saying they were not turned in by a Nov. 10 filing deadline.

But because Nov. 10 was a Sunday and the next day Veterans Day, a government holiday, the law’s opponents actually had until Tuesday, Nov. 12 to get their paperwork in, Sumner said. He also found that Privacy for All Students, a coalition of conservative groups, had made a good-faith effort to deliver the petitions by Nov. 10 but had been unable to because election offices in the two counties were closed.

“A construction limiting exercise of the voters’ referendum power would be against public policy,” the judge said. “The court sees no basis to effectively diminish the people’s referendum power here by giving petitioner only 88 days to collect signatures.”

Bowen’s chief of staff, Evan Goldberg, said the secretary of state would comply with Sumner’s order and allow it to become final without requesting a hearing.

Bowen had determined that the Sunday deadline was binding and disallowed signatures from the two counties because “this is how the law had been interpreted historically and how it was interpreted previously by the secretary of state,” Goldberg said. “This judge has interpreted it differently.”

Privacy for All is attempting to qualify a referendum for the November ballot asking voters to invalidate the new law, which took effect on Jan. 1 and is the first of its kind in the nation. The law requires public schools to let children use the sex-segregated facilities and participate in the gender-specific activities that correspond with their expressed identities.

Supporters maintain it is needed to provide statewide consistency and civil rights protections at a time when students are identifying as transgender at younger ages. Opponents argue that it exposes the classmates of transgender youth to potentially uncomfortable situations in restrooms and on sports teams.

Although the number of signatures at issue is small, the judge’s ruling could end up determining whether or not the referendum qualifies for the November ballot. To obtain a public vote on the law, passed by the legislature and signed by Gov. Jerry Brown as the Student Success and Opportunity Act, about 505,000 of the total gathered by the referendum’s sponsors need to be valid.

Counties have until Jan. 8 to verify them through random spot-checking. Depending on how many are found to be valid through that process, the secretary of state will approve the referendum, determine that it failed or order a review of every signature.

As of Monday, the last day the information was updated, the effort was coming down to the wire; with results from six of California’s 58 counties still outstanding, just enough of the signatures were authenticated through random sampling to trigger a full count.