SAN FRANCISCO (CBS SF) — Hoping to help students improve grades and fight sleep deprivation, Gov. Gavin Newsom signed a new law that will forbid middle schools from beginning their day before 8 a.m. and prohibit high schools from starting class before 8:30 a.m.

The measure was authored by State Senator Anthony J. Portantino, who cited medical studies showing later start times will improve classroom performance and the overall health of elementary, middle school and high school students.

READ MORE: Vietnam Airlines Launches First Non-Stop Service From SFO To Ho Chi Minh City

The schools will be forced to put the measure in place by July 1, 2022 at the latest.

“Today, Governor Newsom displayed a heartwarming and discerning understanding of the importance of objective research and exercised strong leadership as he put our children’s health and welfare ahead of institutional bureaucracy resistant to change,” Portantino said in a news release. “Generations of children will come to appreciate this historic day and our Governor for taking bold action. Our children face a public health crises. Shifting to a later start time will improve academic performance and save lives because it helps our children be healthier.”

The American Academy of Sleep Medicine currently recommends that teenagers get between eight to 10 hours of sleep per night. Anything less, researchers said, can lead to a host of problems including obesity, a higher risk of injury during school activities and depression.

Meanwhile, the CDC said five out of six middle and high schools in the United States start before 8:30 a.m., while sleep deprivation for students is a common problem across the country. Sixty percent of middle schoolers and 70 percent of high schoolers do not get the recommended amount of sleep.

“When I heard the good news I literally got choked up because of the overwhelming positive impact this will have on our children and for the deep appreciation for everyone who took this journey together,” Portantino said.

While a several organizations including the California PTA had rallied behind the bill, it did face stiff opposition who cited increase costs to schools and families. Last year. then Gov. Jerry Brown vetoed the measure.

KPIX 5 spoke with some Pleasanton students about the idea of a later school start time. The reaction was mixed.

READ MORE: Gov. Newsom Enlists California Highway Patrol To Help Stop Smash And Grab Robberies

“I’m for the later start time, because I like to sleep in,” said one student.

I say keep it the way it is. It prepares kids for the real world, said a second.

Harvest Park Middle School counselor Monica Wharton was in favor of the idea.

“There’s a lot of research that supports the later start,” said Wharton. “Hopefully If they are getting that extra hour of sleep they will be better able to focus in the classroom. People will be emotionally regulated, not so quick to get upset or angry about different things and ready to learn.”

Parent Jigar Shah offered another idea.

“I’m saying they should be starting sooner, like at 7:30 a.m. and then get home early,” said Shah. However he admitted he hadn’t discussed the idea with his children.

The teens KPIX 5 spoke with said even if the later start time allowed them to sleep in and go to bed at later hours, they were sure the change would not extend their screen time to use their phones.

Juliette Goodrich contributed to this story.

MORE NEWS: COVID: Omicron Variant Has Some Bay Area Families Revising Holiday Travel Plans