Spending on health care in Massachusetts rose to $57.2 billion in 2015, growing more slowly than in 2014 but for the second straight year outpacing the benchmark set under a 2012 cost containment law, according to a new state report.

The 3.9 percent growth in total health care spending, estimated in the Center for Health Information and Analysis’ annual report, was above the 3.6 percent benchmark, but below the 4.8 percent growth rate recorded in 2014.

Driven by a spike in MassHealth spending and enrollment and rising pharmaceutical costs, the 2014 growth rate concerned watchdogs and policymakers who have aimed to rein in costs that can squeeze the state budget, employers and individuals.

“Generally, I think it is good news,” Health Policy Commission chairman Dr. Stuart Altman said of the report. “I think 3.9 effectively is at the benchmark. Given that we’re talking about a huge industry like health care, the difference between 3.65 and 3.9 really is in the margin of error. I think it’s fair to say that our major health care system and employers are trying to do the job that the legislation had in mind.”

With last year’s increase, health care spending now averages $8,424 per resident in Massachusetts. The health care spending increases mirrored the per capita 3.9 percent growth of the state’s economy, and was slower than the projected 4.9 percent per capita growth for national health care expenditures.

Average Massachusetts private commercial health insurance member cost-sharing, including items like deductibles and co-payments, increased by 4.4 percent between 2014 and 2015, to $567 per member per year. Between 2013 and 2015, average Massachusetts medical cost-sharing growth of 10.3 percent exceeded average income gains of 6.1 percent.

Lora Pellegrini, the president and CEO of the Massachusetts Association of Health Plans, said she viewed it as a good sign that health care spending locally is not growing at as fast a pace as it is on a national level.

“It’s telling me that having that cost benchmark in place is having some impact, although we clearly didn’t hit the target,” she said. “We were close.”

The CHIA report is scheduled to be presented at a Wednesday afternoon Health Policy Commission meeting, and its findings will be the basis for cost trend hearings the commission holds next month to examine the drivers of spending growth.

In 2015, commercial insurance spending rose $927 million to $20.6 billion, an increase of 4.7 percent, and spending for MassHealth members rose 4.6 percent from $15.4 billion in 2014 to $16.1 billion in 2015, according to the report. MassHealth spending represented around 28 percent of all health care expenditures in 2015.

Altman said the MassHealth growth rate is “way down” over 2014, when spending in the state’s Medicaid program grew by 17.9 percent as the implementation of the Affordable Care Act led to higher enrollment and Health Connector technology failures that forced people into temporary MassHealth plans.

Spending for temporary MassHealth coverage fell from $635 million in 2014 to $51 million in 2015 as members transitioned to other forms of coverage, the report said.

“Overall, the system is responding to the challenges and is doing well,” Altman said.

Pharmacy expenditures accounted for approximately one third of the overall growth in health care spending per capita in 2015, the report found, with payers reporting $8.1 billion in prescription drug spending.

The 10.1 percent increase in pharmacy spending follows a 13.5 percent increase in that area in 2014.

The costs of prescription drugs have gained attention both on Beacon Hill and nationwide, particularly driven by high-profile price hikes on individual medications. Last week, Congressman Stephen Lynch called on the House Oversight and Government Reform Committee to hold a hearing to examine the pricing practices of the drug manufacturer Mylan. Mylan increased the retail price for a two-pack of its epinephrine auto-injector EpiPen from less than $100 in 2007 to $600 in 2016, according to Lynch’s office.

Altman said that while the state can take some steps to address drug costs, the issue is a national one, and he expects heightened public interest to prompt a shift in policy or practice so drugmakers become “a little more price responsive.”

“I do think that if this industry does not change its habits, you will see legislation both at the state level and the federal level,” he said.

In response to the 2014 rise in health care spending, the Health Policy Commission in January issued a series of recommendations to rein in further increases. One recommendation called on state lawmakers to require greater transparency in drug pricing and manufacturer rebates.

A bill that would have instituted drug pricing disclosure mandates (S 1048) was effectively killed in June when lawmakers included it in a study order.

Pellegrini, whose association supported the disclosure bill, said she still believes greater transparency is crucial to determine whether drug prices are increasing for valid reasons.

“I think that unfortunately, the price of drugs is unsustainable, and it’s going to really crush the health care system, unless we get a better handle on what’s driving that cost,” she said.

Medicare had the highest pharmacy spending growth from 2014 to 2015, rising 14 percent while MassHealth pharmacy spending grew by 9.1 percent and private commercial insurance by 11 percent, according to CHIA.