Herman Rowland Sr., the chairman of Jelly Belly, donated $5,000 to the effort to repeal California's first-in-the-nation transgender student law, known as Assembly Bill 1266.

The law, signed in August by Governor Jerry Brown, requires public schools to allow transgender K-12 students access to the restroom and locker room of their choice. Those students can also decide what sports they want to play.

The group Privacy for All Students is collecting signatures for a voter initiative. The deadline to submit the petitions is less than two weeks away.

According to Frontiers, the donation was posted on the Secretary of State's website.

The donation has provoked a Change.org petition from the National Center for Lesbian Rights (NCLR), which lobbied for the law.

“Stop hurting transgender students by funding the effort to overturn California's new School Success and Opportunity Act,” reads the petition, which is addressed to Rowland. “This law ensures that transgender students are allowed to participate in school programs and activities just like every other boy and girl.”

The National Organization for Marriage (NOM), the nation's most vociferous opponent of gay marriage, has endorsed the repeal effort and lent its political director, Frank Schubert, to head the campaign.

(Related: Gay marriage foe NOM endorses effort to repeal transgender student bill.)