Standard & Poor's on Monday raised its outlook on the U.S. government's credit rating to "stable" from "negative" but left the country's rating at AA+.
To some extent Congress has Ben Bernanke to thank for the improved outlook.
S&P noted that the Federal Reserve has "both the strong ability and willingness to support sustainable economic growth and to attenuate major economic or financial shocks." As an example, S&P cited the Fed's "timely and effective actions" that mitigated the effects of the deep recession in 2008 and 2009.
It also noted that it expects the U.S. economy to match or exceed the performance of other countries with top credit ratings in the coming years.
Related: Spending cuts likely deeper in 2014
As for Congress, S&P still isn't wowed by lawmakers' ability to manage the country's medium- and long-term debt problems. There's still too much partisanship for that.
But, the agency said, it sees improvement on a few fronts.
The first is that Congress managed to strike a deal on the fiscal cliff over New Year's. That deal let some tax cuts expire on high-income earners -- thereby raising more revenue. But it also averted what would have been a sudden amount of other tax increases and spending cuts that could have hurt the economy in the near term.
And the 2011 Budget Control Act, which called for automatic budget cuts to occur in the absence of a broader debt deal, "has engendered a fiscal adjustment, albeit in a blunt manner," S&P said.
Those elements combined with a recovering economy and higher-than-expected payments to the government from mortgage giants Fannie Mae and Freddie Mac have drastically reduced deficit forecasts for the next few years.
That will keep government debt as a share of the economy "broadly stable," the agency noted, buying policymakers more time to address the increasing pressures on the federal budget as a result of an aging population and rising health costs.
Second, while S&P still expects lawmakers to engage in a lot political posturing over having to raise the country's debt ceiling this fall, it assumes "the debate will not result in a sudden unplanned contraction in current spending ... let alone debt service."
Of course, "political brinksmanship" was a key reason why the agency stripped the United States of its AAA rating following the debt ceiling fight of 2011. During that debate, some Republican lawmakers were publicly saying that default, while not desirable, might be the only way to force Congress to rein in the federal budget.
Interactive: World's largest economies
Looking ahead, it's not that S&P doesn't expect more brinksmanship. It's just that "we don't think the brinksmanship will get worse" than it was in 2011, said Nikola Swann, S&P's top U.S. analyst. In other words, it's already factored into the agency's AA+ rating for the United States.
By raising its U.S. rating outlook to stable, S&P said that means there is less than a one-in-three chance that the agency would lower the country's credit rating in the near term.
But it also warned that policymakers "could place renewed downward pressure on the rating" if they relax fiscal policy without addressing longer-term budget challenges.
By contrast, to restore the United States to the AAA rating would take two things: a credible plan to reduce deficits over the long run and clear indication that brinksmanship is a thing of the past, Swann said.
Typically, restoring a country's AAA rating can take awhile. He said no country has done so in fewer than nine years.
It's not likely that S&P's action on Monday will materially change anything in terms of the federal government's capacity to borrow, which if anything increased after the initial downgrade two years ago.
"S&P's bump of the US outlook from negative to stable is not a meaningful event on its own," said Sean West, U.S. policy director for the Eurasia Group. "But it is important as an acknowledgment of just how much the US environment is improving."