Minnesota has climbed to second-best in the country, but still ranks behind its neighbor to the south, Iowa.

The Gopher State was outranked by Iowa overall, including in infrastructure, health care and education, according to a study from U.S. News and World Report released Tuesday.

But Minnesotans have a better quality of life (second, behind North Dakota) and more opportunities (ranked third).

Last year, Minnesota was ranked third in the nation.

"This study reaffirms what Minnesotans have always known: Our state is one of the very best places in the country to live, work, and raise a family," Gov. Mark Dayton said in a news release.

"However, we have more work to do [to] build an even better Minnesota."

Minnesota ranked No. 7 in health care, which includes access, affordability and quality. It's No. 13 in education and No. 11 in crime and corrections, which includes low incarceration and violent crime rates.

The ranking weighted some categories heavily (education, health care and the economy, followed by infrastructure and crime) based on a national survey that asked more than 30,000 participants to prioritize them in their state.