Two bond-rating agencies gave Minnesota top marks Wednesday, confirming that the state is in good financial health 10 years after the Great Recession.

"Our state government has made a complete financial turnaround in the past 7½ years," Gov. Mark Dayton said in a statement. "The credit for Minnesota's success belongs to the people of our state. I thank Minnesotans for their many contributions to the strength of our economy and the stabilization of our State's budget."

Standard & Poor's and Fitch both gave Minnesota its highest rating, AAA, while Moody's Investors Service continued to rate Minnesota at Aa1, its second-highest rating. A higher bond rating means Minnesota can borrow money for projects at a lower interest rate, saving taxpayer dollars.

Dayton, a Democrat, has emphasized the need to bolster the state's reserves and improve its fiscal health during his past two terms. He and Management and Budget Commissioner Myron Frans recently visited the bond-rating agencies to make their case, highlighting a bill passed this year that overhauls the state's pension system and puts Minnesota on a more stable path to provide benefits for retirees and public workers.

Both S&P and Fitch downgraded Minnesota a notch in 2011, the year Dayton took office. Minnesota was still struggling with the aftershocks of the Great Recession when the agencies lowered its bond ratings. At that time, the state's reserves were empty and it was facing a $6.2 billion deficit, according to the Dayton administration.

Former Gov. Tim Pawlenty, the Republican who led the state before Dayton and is now running again for his old job, did not immediately respond to a request for comment.

Senate Majority Leader Paul Gazelka, R-Nisswa, said: "The Republican-led Legislature's work to spur economic growth, minimize debt and reform public pensions has paid off in a big way, with a credit rating upgrade that has been elusive up to now."

Republican Rep. Jim Knoblach, of St. Cloud, chair of the House Ways and Means Committee, said the bond rating was the result of the Legislature and governor working through differences to pass pension reform and last year's tax bill.

"It's good news for Minnesota," Knoblach said. "Congratulations to the Legislature and the governor, because it's working together."

He also attributed the state's economic turnaround to its diverse industries, including agriculture, technology, mining and health care.

Fitch returned the rating to AAA in 2016 and has reaffirmed that the past two years.

This is the first year since 2011 that S&P has given Minnesota a AAA. In a news release, S&P credit analyst Eden Perry said the pension changes played a role in the higher rating.

"The upgrade reflects the state's improved financial performance, return to strong budget management and structural budget balance, and the 2018 Omnibus Retirement Act, which is expected to decrease pension liabilities through benefit reform and increased contributions," Perry said.

Moody's said its Aa1 rating reflects "the state's diverse and growing economy, supporting healthy revenue growth in recent years."

It is also a reflection of improvements in how the state manages its finances, including replenishing its reserves. The state's debt and pension burdens are manageable and give the state financial flexibility, the agency said.

"Management of our state pensions had long been a concern for the rating agencies, so it was a highlight of my time as commissioner to tell them we had taken a significant step to achieve pension reform with bipartisan support," Frans said in a statement.

Staff writer Chao Xiong contributed to this report.