One spot of good news in the census data released Wednesday was on the health-care front: For the first time in three years, the share of Americans without health insurance declined, with the number of uninsured dropping by 1.3 million people from 2010 to 2011.

A major factor was an influx of newly insured young adults, many of whom benefitted from a provision in the 2010 health-care law requiring insurers to let parents keep adult children on their plans up to age 26.

But for most other age groups, the numbers largely reflected the continuation of a long-running shift away from private insurance toward government coverage — with Medicare and Medicaid picking up much of the slack left by the steady erosion of employment-based insurance.

For the fifth straight year, the portion of Americans on Medicaid, the joint federal-state program for the poor and disabled, increased, reaching 16.5 percent in 2011. The increase offered one more reminder of the sluggish pace of the recovery from the Great Recession, which technically ended in June 2009.

As in the recent past, Medicaid played a particularly important role for children, whose overall un-insurance rate of 9.4 percent remained unchanged in 2011, even as the share with private plans dropped slightly.

The portion and number of Americans covered by Medicare also continued to rise, as more baby boomers entered retirement age.

In a notable break from the continuous declines of the past decade, the share of people with employer-sponsored coverage held steady in 2011, largely because of the addition of young adults.

Their gains offset the continued loss of employer-sponsored coverage among adults ages 25 to 64.

“But for the young adults provision [in the health-care law], you would have had a decline in private coverage once again,” said Edwin Park, an analyst with the left-leaning Center on Budget and Policy Priorities.

Individuals ages 19 to 25 also accounted for 40 percent of the decline in the overall number of uninsured people. The uninsured dropped from 16.3 percent in 2010 to 15.7 percent in 2011.

Supporters of the health-care law immediately cited the census findings as evidence the statute is having a positive impact. Ron Pollack, head of the advocacy group Families USA, pointed to not just the young adults measure but also to the law’s prohibition against states cutting their Medicaid programs.

“Clearly Medicaid has played a heroic role in making sure people have coverage who would otherwise be uninsured,” he said.

And he noted that beginning in 2014 the law will reduce the ranks of the remaining 48.6 million uninsured by tens of millions more — largely by expanding Medicaid and providing federal subsidies to help more Americans buy private coverage.

“This sends a message that we need to move forward with other improvements that will affect all age groups so they, too, can get the benefits” of the law, he said.