Massachusetts would move closer to fulfilling the vision of a 20-year-old state law requiring parity in care for mental health under a bill the Senate unanimously adopted Thursday.

The sweeping bill, which supporters say could lead to historic changes in the mental and behavioral health care landscape, aims to guarantee that patients have the same access to mental health care as they do to physical health care.

To accomplish that goal, the bill creates new enforcement mechanisms for the state, calls for an expanded and more diverse practitioner workforce, seeks a rate floor to pay mental health clinicians the same as primary care providers for similar services, and more.

"This is a really big first step. I'd call it landmark. This is so many years, decades in the making," Senate President Karen Spilka said following the legislation's passage. "This bill will lay the foundation. It's the first step in hopefully many steps we will be taking over the next few sessions to start correcting and fixing what has been a broken system for so many people."

While the legislation focuses on mental health, its mechanisms are wide-ranging and varied.

The Division of Insurance would have new oversight and enforcement tools to ensure insurance companies handle mental health coverage equally. Carriers would need to report information about their compliance every year, and the state could penalize them for any violations in parity.

Insurers would no longer be able to require prior authorization for patients who need acute psychiatric inpatient care, placing those treatments on the same level as emergency physical treatment. The bill also calls for a commission to study medical necessity criteria, a provision designed to ensure that patients are not improperly deemed not to require vital mental health services.

"What we try to do in this bill which may be unique among states, is to do this in such a comprehensive way," said Sen. Julian Cyr, co-chair of the Joint Committee on Mental Health, Substance Use and Recovery and the bill's lead sponsor. "We're laying the foundation for things we can do immediately that are going to make a really big difference around access, and then what we're going to be able to come to next."

The legislation passed 38-0 and now goes to the House, whose leaders have not indicated their plans. Senate Minority Leader Bruce Tarr praised the bill during debate as a bipartisan effort to effectuate changes "overdue by decades."

A 2000 state law and a 2008 federal law both require insurers to provide mental health benefits comparable to those offered for physical health, but advocates and legislators say those standards have never fully been met.

Sen. Cindy Friedman, who co-chairs the Health Care Financing Committee, said that because the existing laws are vague, insurers could often claim they were cooperating without actually doing so.

"There was a real lack of specificity around what the expectation and requirements were around parity," she said. "For a long time, while these laws have been on the books, it's really been about self-reporting, so insurers and people who are responsible for parity were allowed to self-report."

Senators cited examples of gaps in coverage during Thursday's debate: roughly 50 percent of mental health care providers in Massachusetts do not accept insurance because of low rates or burdensome paperwork, they said, and even if a practitioner does take a patient's insurance, it can take weeks to secure an appointment.

The Senate rejected an amendment requiring behavioral health providers to accept at least one form of insurance as a condition to remain licensed. Later, the Senate adopted a Sen. Nick Collins amendment creating a commission to study behavioral health workforce needs, focusing on how to get more practitioners to accept insurance and whether it is feasible to mandate accepting insurance as a condition for licensure.

Senators also rejected an amendment offered by Veteran Affairs Committee Co-chair Sen. Walter Timilty aimed at requiring mental health care providers to accept TriCare, an insurance plan used by military famililes. Timilty said there's a shortage off providers who accept that plan.

Those with acute or co-occurring conditions often face the largest challenges. Sen. Marc Pacheco, a Taunton Democrat, pointed to the high rate of inmates in southeastern Massachusetts who have unmet mental health or substance use needs.

Before a single amendment was considered Thursday, more than 20 senators from both parties — a majority of the chamber — rallied with health care providers and mental health experts to tout the importance of the bill.

More than a dozen speakers at the event, including leaders of industry organizations, labor organizations and hospitals, voiced their support for the legislation at the event, calling it "historic."

"Discrimination has for too long driven disparities in insurance coverage and health care access for children, adults and their families," said Danna Mauch, president and CEO of the Massachusetts Association for Mental Health.

Rebecca Gerwitz, executive director of the National Association of Social Workers' Massachusetts chapter, said her organization's "therapy matcher" service that connects patients to therapists that accept their insurance saw a 70 percent increase in calls last year alone.

Some of those, she said, were from desperate residents who had been searching for help without success for weeks or months straight.

"The crisis of access to mental health services is real," Gerwitz said.

One amendment the Senate adopted calls for protocols capping at 48 hours the amount of time patients younger than 21 can be held in emergency departments before placement into inpatient psychiatric treatment.

Longmeadow Sen. Eric Lesser said a constituent who works in an emergency room told him two years ago that children between the ages of 5 and 17 were sometimes boarded in her department for up to 18 days awaiting a psychiatric bed.

"We would never tolerate that for a heart attack. We wouldn't tolerate that for a broken leg. We wouldn't tolerate that for a gunshot. We wouldn't tolerate that for a car accident victim," Lesser said on the floor. "These are kids sitting in emergency rooms without proper staffing, without proper protections, for days and days and weeks and weeks. Shame on us if we cannot deliver a way to help them and their families get the treatment and support they need."

While the bill includes several other pilots and studies at a total projected cost of roughly $6 million, it does not target spending more broadly. A Gov. Charlie Baker bill, by comparison, would require both insurers and providers to significantly increase spending on primary, mental health and senior care.

Both before and during Thursday's debate, senators shared their own stories of mental health challenges.

Spilka said during unveiling of the bill that her father suffered from significant mental health issues after his service in World War II but never sought help because of stigma.

Cyr said on the Senate floor that therapy helped him manage depression and anxiety. But even today, he said, he can struggle to get insurance coverage for outpatient treatment.

"I've gotten dozens, probably hundreds of messages from people saying, 'thank you for talking about mental health in a personal way,'" Cyr said. "Our broken mental health system is something that, I think, a lot of people have been dealing with quietly and have really felt in isolation."