BOSTON — Massachusetts has the nation’s highest rate of residents with health insurance. Visits to emergency rooms are beginning to ease. More residents are getting cancer screenings and more women are making prenatal doctors’ visits.

Still, one of the biggest challenges for the state lies ahead: reining in spiraling costs.

Six years after Gov. Mitt Romney signed the nation’s most ambitious health care law — one that would lay the groundwork for his presidential opponent’s national version — supporters say the Massachusetts law holds promise for the long-term success of Barack Obama’s plan.

Like the federal law it inspired, the Massachusetts law has multiple goals, among them expanding the number of insured residents, reducing emergency room visits, penalizing those who can afford coverage but opt to remain uninsured, and requiring employers to offer coverage or pay a fine.

Story continues below advertisement.

Supporters of the Massachusetts experiment are quick to point out its successes.

An additional 400,000 individuals have gained insurance since 2006, meaning about 98 percent of residents have coverage.

A recent study by the Blue Cross Blue Shield of Massachusetts Foundation found that between 2006 and 2010, the use of emergency rooms for non-emergency reasons fell nearly 4 percent. That was a key goal of the law, since using emergency rooms for routine care is far more expensive than visiting a doctor.

State health officials also point to what they say are increases in mammograms, colon cancer screenings and prenatal care visits and a 150,000-person reduction in the number of smokers after the state expanded coverage for smoking cessation programs.

“Since Gov. Romney signed health care reform here in Massachusetts, more private companies are offering health care to their employees, fewer people are getting primary care in an expensive emergency room setting, and hundreds of thousands of our friends and neighbors have access to care,” said Gov. Deval Patrick, a Democrat and co-chairman of Obama’s re-election committee.

Another reason the law remains popular may be that so many Massachusetts residents receive insurance through work and have been largely untouched by its penalties. The Blue Cross Blue Shield study found 68 percent of non-elderly adults received coverage through their employers in 2010, up from about 64 percent in 2006.

The study also found no evidence to support one fear lawmakers had when they approved the law — that employers or workers might drop coverage because of the availability of public coverage.

Another indication of the law’s acceptance in Massachusetts is the reduction in the number of those assessed a tax penalty for failing to have insurance despite being able to afford it. In 2010, 44,000 Massachusetts tax filers were assessed the penalty under the “individual mandate.” That’s a drop from the 67,000 people required to pay the penalty in 2007, the first year it was assessed.

In 2010, the highest penalty was $93 a month, or $1,116 a year. In 2012, the highest penalty increased to $105 a month, or $1,260 a year.

Massachusetts is the only state with an individual mandate, although the Supreme Court last week upheld the constitutionality of a similar mandate in the federal law.

Despite the penalty, most polls place support for the initiative at more than 60 percent, about double the approval rate for the federal health care law.

Supporters say there’s a lesson there too. The more people begin to understand the benefits of the federal law, they say, the more support for the federal law should increase.

“The first lesson is that you can meet the goals we set out in Massachusetts, you can cover the majority of the uninsured and fix the broken market” for health care, said Jonathan Gruber, who helped craft both the state law and the federal law as an adviser to Romney and Obama.

“And you can do so with broad public support,” Gruber said. “Based on what we’ve seen in Massachusetts, people like this.”

Getting more people insured doesn’t necessarily improve their access to care, however.

A survey last year by the Massachusetts Medical Society found long waits for appointments with primary care doctors: an average of 48 days for an internist and 36 days for a physician of family medicine. More than half of primary care doctors were no longer taking new patients, a slight increase from the previous year.

At the same time, since the law was approved in 2006, Massachusetts residents are more likely to have a place they usually go when they are sick or need advice (up 4.7 percent), more likely to have had a preventive care visit (up 5.9 percent), more likely to have had multiple doctor visits (up 5 percent) and more likely to have had a dental visit (up 5 percent), the Blue Cross Blue Shield report found.

The charge that the law has been a “budget-buster” in Massachusetts has also been challenged.

A recent study by the business-backed Massachusetts Taxpayers Foundation found that during the five full fiscal years since it was implemented, the law has cost the state an additional $91 million a year after federal reimbursements — well within initial projections.

The idea of exporting Massachusetts’ law to the rest of the nation has its critics too.

Josh Archambault, health care policy director for the Pioneer Institute, a conservative-leaning Boston-based think tank, said a narrower approach would be better.

“There are many unintended consequences when Washington tries to design a policy that meets the very different needs of states as diverse as Massachusetts and, say, New Mexico,” he said. “We need some specific federal actions to increase access to affordable health care, but the (federal law) went too far.”

There’s also at least one big cautionary note: Massachusetts still struggles to slow the spiraling cost of health care for residents.

This year both the Massachusetts House and Senate have approved bills aimed at trimming projected health care costs in the state by $150 billion to $160 billion over the next 15 years. A committee is hoping to iron out the differences between the two bills before the end of the formal session July 31.

Gruber said that while expanding coverage is easier than controlling costs, the cost question shouldn’t be used as a reason not to expand coverage.

Gruber, who wrote a comic book called “Health Care Reform: What It Is, Why It’s Necessary, How It Works” to help explain the federal law, likened health care expansion to a baby in its crib.

“We’re going to have to crawl before we can walk and run,” he said. “To say the bill failed (because it didn’t include cost controls) is to say we need to keep the baby penned up until it can run.”