The Maryland Senate gave final approval to a bill that would overturn an executive order by Gov. Larry Hogan (R) that required local school districts to start their school year after Labor Day.

The Senate voted 31 to 13, along party lines, to advance the measure, which would allow local school districts to decide when schools should begin and end. The legislation heads to the House for consideration.

Hogan issued the executive order in 2016. Local districts say they have struggled to create calendars to meet the requirement of starting after Labor Day and ending by June 15.

Several Republican senators spoke against the bill, saying that the post-Labor Day start is popular among Maryland residents, allowing parents to spend more time with their children and helping to boost the state’s economy. Proponents of the bill said school districts should have the flexibility to create calendars that address the needs of their communities.

Hogan described the vote as “partisan hypocrisy” on his Facebook page, arguing that some Democratic senators in the past supported a post-Labor Day start.

Last week, the governor said he would submit a bill that would require any jurisdiction that wants to open before Labor Day to put the proposal on the ballot. He also indicated that if the measure backed by Democrats moved forward, he would lead an effort for a statewide referendum on the issue.

This story has been updated to include a mention of Gov. Hogan’s Facebook post.