Reading, writing ... and reefer?

A first-in-the-nation bill that would allow students to have medical marijuana in school is heading to the Colorado governor’s desk after passing the state legislature late Monday night.

The change in the law was sought to let schoolchildren in Colorado who are living with conditions like epilepsy, cerebral palsy and seizures take doses of low-THC medical marijuana. While marijuana possession and use is legal in Colorado, schools are still drug-free zones -- but bill supporters argued medical marijuana should be treated no differently than other medications.

“We allow children to take all sorts of psychotropic medications, whether it’s Ritalin or opiate painkillers, under supervised circumstances. We should do the same here,” Rep. Jonathan Singer said.

Singer, a Democrat, sponsored what became known as "Jack's Amendment." The amendment was inspired by 14-year-old Colorado boy Jack Splitt, whose personal nurse was reprimanded at his middle school for putting a medical marijuana patch on Jack’s arm that was prescribed by doctors to help his spastic quadriplegic cerebral palsy and dystonia. They were told never to return with the patch again.

The bill would allow parents or caregivers, with a doctor’s note, to come into schools and administer marijuana in the form of a patch.

“Jack’s Amendment will assure that children don’t have to choose between going to school and taking their medicine,” Singer said. Singer also sponsored the underlying bill, which was initially intended to regulate marijuana caregivers.

Stacey Linn, Jack's mother, told FoxNews.com she's "relieved" her son will be able to take his medicine at school.

"It was so frustrating that we finally found a medicine that worked, and then had it stripped away from him at school. It was unacceptable," she said.

With the Colorado legislative session set to end on Wednesday, lawmakers were racing against the clock to pass the bill.

The legislation cleared the Colorado House with overwhelming support, and unanimously passed the state Senate. Gov. John Hickenlooper, a Democrat, has 30 days to sign or reject the bill. Colorado would become the first state in the nation to allow medical marijuana in the classroom, if the bill is signed.

A spokeswoman for the governor said Tuesday Hickenlooper planned to sign the bill.

But the legislation still could raise concerns. Robert O’Brien, former adviser on the Mitt Romney presidential campaign, said more marijuana in schools is a bad idea.

“Even in a tightly regulated regime, I don’t think more marijuana in the schools is a better idea,” O’Brien told FoxNews.com's "Strategy Room." “The kids need to get the treatment they deserve, if it’s an efficacious treatment, that’s great, but I don’t want that in the schools.”

If the bill is signed, it's unclear exactly what the penalties might be for students, or adults, who don't follow the new rules. But drug-free zone laws can come with tough penalties. Illicit sale in a no-drug school zone in Colorado, for instance, carries an eight-year sentence.

Parents in Maine also are urging lawmakers to allow medical marijuana in their schools, but have not gotten as far as in Colorado.