Marin County has been ranked the healthiest county in the state for the fourth year in a row, while Sonoma County earned the No. 12 spot for the third year in a row, according to a national survey of more than 3,000 counties.

Napa County ranked 24th out of 57 in the state, down from the 14th spot last year, according to the survey by Robert Wood Johnson Foundation and the University of Wisconsin Population Health Institute (countyhealthrankings.org). Solano County came in at No. 32; Mendocino County, 43; and Lake County, last at No. 57.

While Marin has fared well in recent years, local health officials attributed the top ranking to policies that work to limit tobacco use, with partnerships between public health and community leaders working to promote such policies and programs  that lead to better health outcomes, according to the Marin County Department of Health and Human Services.

"Marin's success in tobacco control is the result of many years of community-wide effort to change social norms around tobacco use,” said Larry Meredith, director of Marin County Department of Health and Human Services, in a statement. “Policies such as San Rafael’s 100 percent smoke-free multi-unit housing ordinance greatly contribute to healthy outcomes for current and future Marin residents," he added.

In Sonoma County, officials said the ranking released today, coupled with another recent report from the Commonwealth Fund that named the county's health system as one of the best in the country, demonstrate that it is " one of the best places to live, work, and play in the state."

Sonoma County public officials have set a goal to become the healthiest in the state by 2020, and the recent ranking is an important step in achieving that goal.

"The Board [of Supervisors]  has prioritized a healthy community as a strategic area of investment, and has set a vision of becoming the healthiest county  in California by 2020. With full implementation of the Affordable Care Act just around the corner, we are making wise investments in our community and services to achieve that vision and successful implementation of health care reform for our residents," Board President David Rabbit said in a statement.

Researchers behind the County Health Rankings project warn against using the report as an authoritative comparison, and instead encourage communities to identify areas where health can be improved.

To that end, both Marin and Sonoma county identified key areas of focus going forward, with smoking and drinking rates, along with adult obesity rates among the top concerns. And the rankings do not show the differences in health status between communities.

“There is plenty here to be celebrated, but it’s important to recognize that not everyone in Marin enjoys high levels of wealth and health,” said Dr. Matt Willis, a public health officer for Marin County.

In particular, Marin ranks in the bottom 25 percent for excessive drinking rates, with one of the highest rates among California counties, with the region's teenagers having used alcohol at a higher rate than other counties.

Additionally, Marin ranks second to last in income equality, according to public health officials. That can affect a number of health factors, among them: How communities invest in health and well-being of individuals;How individuals perceive both their status within and in connection to the community;Segregation of communities spatially along racial, ethnic and economic lines;Spatial isolation of wealthy from poor results in selective abandonment of poor and racial, ethnic minority neighborhoods;How much longer people in areas of wealth live, while people living in areas with less income and wealth are likely to die younger.

The Sonoma County Department of Health Services and other community partners are working through Health Action, the Coalition for a Tobacco Free Sonoma County, the Prevention Partnership, the Safe Routes to School program, Healthy by Design, the Teen Health Advocacy Coalition, the Community Planning process through the Mental Health Services Act, and the Healthy Students Initiative, to move the county's  ranking in the right direction, officials said.