Elections officials across California will now begin checking every signature submitted on a referendum to cancel the state's new law transgender students law -- and the first review raises the real possibility the measure could fail to make the fall ballot.

State elections officials on Wednesday announced the referendum to overturn Assembly Bill 1266 failed to qualify for the ballot by a random sampling of voter signatures, but appears to have enough valid signatures to trigger a full count.

A total of 619,244 signatures were gathered by opponents of the law. To qualify for the Nov.4 ballot at least 504,760 of those must be deemed valid.

For weeks, political watchers have been closely watching daily signature check reports from California's 58 counties. The final report (PDF) came perilously close to dooming the measure.

"Just how close was it?" wrote Scott Lay in his Wednesday midday politics newsletter. "Los Angeles only had two duplicate [signatures] in the sample of 3,929. If there had been five... [the] A.B. 1266 referendum would have failed outright."

The law, signed by Gov. Jerry Brown on Aug. 12, requires California schools to allow a student to choose sex-segregated activities or facilities based on the student's self-professed gender identity.

AB 1266 was intensely debated at the Capitol in 2013. Supporters believe it will codify the rights of transgender students whose local school rules may not cover the needs of someone who doesn't identify with the gender he or she was assigned at birth.

Opponents, meantime, argue that local communities should have their own flexibility when it comes to school policies, and the most vocal critics have accused the new law as allowing -- among other things -- "co-ed bathrooms" on school campuses.

(The law does not, however, appear to make that sweeping of a change. Its language says that students "mayuse facilities consistent with his or her gender identity, irrespective of the gender listed on the pupil's records.")

The referendum would ask voters in November whether to keep the new law on the books... or repeal it.

The initial review completed on Wednesday projects 482,582 thepetition signaturesare valid. If those numbers hold during the full review, the referendum would miss qualifying for the ballot by about 22,000 signatures.

Backers say they aren't worried.

"We are confident we will make it,"said Karen England of the campaign to overturn the law, Privacy for All Students.

England argues that the random sampling of signatures produced some "weird statistical things" that won't hold true once all the signatures are checked.

Nonetheless, recent history suggests a tough road ahead. The last ballot measure to go to a full signature count, November's initiative on health insurance rates, ended its final check with about 21,000fewer valid signatures than projected during the random sample process.

A.B. 1266 referendum backers not only can't afford to lose signatures, but instead need the overall validity rate to go up in this second round by more than three percentage points.

There also remains some debate as to whether the new law is, or is not, in effect while the referendum signatures are being tallied. School officials across California have been advised (PDF) to begin implementing the transgender students policy. Opponent Karen England, though, argues state law makes it clear that simply submitting referendum signatures above the minimum threshold is enough to suspend A.B. 1266.

One thing is for certain: had the anti-transgender law referendum qualified for the ballot under the random signature sampling, there would be no doubt that A.B. 1266 would be on hold until November. That answer now won't come for several more weeks.

John Myers is News10's political editor. Check out his Twitter feed on California politics, his Facebook page, and the weekly News10 Capitol Connection politics podcast.