BOSTON -- Massachusetts voters favor legalizing marijuana by a small margin, according to a poll released Thursday, as voters begin to cast their ballots early for the Nov. 8 election.

Voters are split evenly on whether to expand the number of charter schools in the state.

There are four statewide ballot questions, with the most active campaigns for and against legalizing marijuana and expanding charter schools.

A poll by the Boston Globe and Suffolk University found that 49 percent of respondents support legalizing marijuana while 42 percent oppose it, with 8 percent undecided.

Opinion on the charter school question is evenly split at 45 percent, with 9 percent undecided.

The polling numbers increase the stakes for both sides of the charter campaign to continue pressing aggressive campaigns in the final days of the election. Early voting, allowed for the first time in Massachusetts this year, began Monday.

The poll of 500 voters was conducted from Oct. 24 to 26 and has a 4.4 percent margin of error.

On the marijuana question, young voters were most likely to support legalization, while older voters were most likely to oppose it. Democrats were more likely than Republicans to support legalization. Voters in Suffolk County were the most heavily in favor, while voters from Worcester and Western Massachusetts were the most opposed.

Forty percent of respondents said they believe marijuana is safer than alcohol, while only 13 percent said it is less safe. A majority, 53 percent, said they did not believe marijuana was a gateway drug that leads to use of opioids.

One big demographic difference on the charter school question was by race. Nonwhite voters support charter school expansion 58 percent to 33 percent, while white voters oppose expansion 48 percent to 43 percent. Republicans were somewhat more likely than Democrats to support charter school expansion -- with 50 percent in favor to 44 percent opposed among Republicans, and the numbers reversed among Democrats.

Gov. Charlie Baker, a popular Republican governor, has been a strong supporter of charter school expansion and an opponent of marijuana legalization.

Much of the charter debate has been around the impact on traditional public schools if charter schools are expanded. The poll found that more voters, 41 percent, believe charter schools have no significant impact on the budgets of traditional public schools than believe charters drain money from public schools, 37 percent. But at the same time, 80 percent believe allowing more charter schools will have a financial impact on their local school districts.

On the other ballot questions, voters oppose adding a second slots machine in Massachusetts 57 percent to 30 percent.

They support banning the confinement of veal calves, pigs and egg-laying hens and banning the sale of meat or eggs from confined animals 62 percent to 25 percent.