As Massachusetts voters get set to decide if recreational marijuana should be legalized, millions of dollars have been flowing into the state seeking to sway the result.

And as Nov. 8 approaches, look for the commercial airwaves, and your social media feed, to contain more and more advertisements for and against Question 4.

For the last two years, proponents of Question 4 have been amassing nearly $4 million advocating for legalization. Last month, more than 80 percent of expenditures went straight into television ads.

Campaign finance records show that most of the money for the Yes on 4 effort has come from the Washington, D.C.-based New Approach political action committee. As of early this month, New Approach had contributed just under $3 million.

Graham Boyd, the director and co-founder of New Approach, says the money is coming from grassroots fundraising — not, as opponents have charged, from the marijuana industry.

"The philanthropists who are supporting the legalization and regulation of marijuana in Massachusetts are not in the marijuana industry at all," Boyd said. "They are people who believe that it makes no sense to treat marijuana as a crime. That for adults, it should be taxed, regulated and controlled."

A review of New Approach's IRS filings confirms the vast majority of contributions to the PAC come from individuals with no apparent ties to the marijuana industry.

The genesis of New Approach goes back to a late Ohio insurance executive. Peter Lewis, who died in 2013, was a wealthy philanthropist and longtime CEO of Progressive Insurance. He became an advocate for medical marijuana when he used the drug to ease pain following the amputation of his leg in 1998.

Boyd says Lewis set out to change marijuana laws around the country, including here in Massachusetts.

"Peter actually was the funder of 98 percent of the funding for the 2012 medical marijuana ballot measure in Massachusetts," Boyd said. "And he believed very much that that sort of medical model, and a strictly regulated legal model, made sense."

Not all of the money in support of Question 4 comes from out of state. Some of it comes from businesses that stand to benefit, should recreational marijuana be legalized. For instance: 4Front Ventures, located in Boston’s financial district.

"We are a company in the legal, medical cannabis industry," company president Kris Krane said. "We work with operators across the United States helping them navigate the complex regulatory environments around this industry, and helping them set up very professional, compliant operations."

As of early this month, 4Front Ventures had contributed $28,500 to the Yes on 4 campaign and has been providing campaign staffers with free office space. Krane says the decision to contribute was a matter of moral obligation, given his company's success in the marijuana industry.

"Now that the opportunity is here to give back, and help support the campaign financially, I don't think I could live with myself if we didn't help," Krane said.

Supporters of legalized marijuana have had a substantial financial edge. At the beginning of October, fundraising by opponents had lagged by a factor of 6 to 1.

But that gap closed considerably this month when casino magnate Sheldon Adelson, a native of Dorchester, contributed $1 million to the Campaign for a Safe and Healthy Massachusetts.

Prior to Adelson's contribution, campaign finance records show the vast majority of funding in opposition to legalization came from the health care and alcohol industries. The Wine and Spirit Wholesalers of Massachusetts contributed $50,000, and the Beer Distributors of Massachusetts kicked in $25,000. Neither organization returned calls for comment.

However, Pam Wilmot, of the campaign finance watchdog group Common Cause, says it's not unusual for industries to make contributions based on economic self-interest.

"You can see that with the liquor industry," Wilmot said, "clearly the Question 4 approval could be a competitor, and they want to keep them out of that role."

There's even more money coming from the health care industry. Partners HealthCare, the largest employer in the state, contributed $100,000.

Vice president Rich Copp says Partners is concerned about what it's heard about legalization in other states, "particularly with the uncertainty around the safety of dosing of marijuana present in edible forms. We just believe that more research and understanding is needed before broadly exposing the public to this new risk."

The Massachusetts Medical Society also chipped in $10,000 -- the first time it's contributed to a ballot campaign.

"We did make an exception because this ballot question we feel is very dangerous," said society president Dr. James Gessner.

Gessner says he's concerned about the message legalization would send to young people.

"The acceptance of a substance that can cause harm is the wrong message to send to children and adolescents," he said, "and we know that adolescents in the risk-taking times of their lives really perceive the risks of marijuana as having declined."

Groups for and against Question 4 have until 11:59 p.m. Thursday to file their latest financial reports covering the first half of October.

Both sides are expected to add to their war chests as Election Day grows closer, and the issue of legalized recreational marijuana in Massachusetts may be decided once and for all.