Updated

President Obama on Tuesday signed into law a months-in-the-making plan to raise the debt ceiling, putting an end for now to the partisan crisis that risked the first-ever national default.

Before reaching the president's desk, the package cleared the Senate on a 74-26 vote. The deal was approved just hours before the Treasury was otherwise expected to exhaust ways to pay all the nation's bills. The finale of the debate did little to soothe the markets, though, as the Dow closed down 266 points amid troubling economic data.

The president, who spoke in the Rose Garden after the vote, urged Washington to return its focus to the economy, saying the debate over the debt ceiling has proved "unsettling" for businesses and suggesting it has overshadowed the "quiet crisis" over jobs.

"Washington has the ability to focus when there's a timer ticking down and when there's a looming disaster. It shouldn't take the risk of default ... to get folks in this town to work together," Obama said. "We've got to do everything in our power to grow this economy and put America back to work."

Moody's Investors Service, which had warned of downgrading the nation's Triple-A credit rating if the debt ceiling wasn't raised, said Tuesday the rating was safe for now but assigned it a negative outlook.

More On This...

The debt package, which passed out of the House Monday evening, was the result of tense and exhaustive negotiations over the weekend following the collapse of several prior proposals.

Senate leaders hailed the deal as a "testament" to the work of negotiators, while conceding it is "not perfect" and certainly not the last time lawmakers would be at odds over the nation's prolific borrowing.

"This bill does not solve the problem, but it at least forces Washington to admit that it has one," Senate Republican Leader Mitch McConnell, R-Ky., said on the floor, claiming the discussion about spending "isn't something to dread."

Officials moved quickly to set the terms for the debate to come. While the package will initially cut spending by $900 billion, it also tasks a new committee with finding another $1.5 trillion in deficit reduction by the end of the year.

Senate Democratic Leader Harry Reid, D-Nev., said he hopes the committee takes a "fair" approach, suggesting the panel should compel wealthy Americans to pay more in taxes.

"The American people demand fairness. It can't be more cuts to programs that have made this country what it is," he said. Obama echoed those comments in the Rose Garden.

After striking the deal Sunday, party leaders spent the last couple days corralling support from rank-and-file members. Despite the wide margin of approval, several senators continued to voice concerns with the bill in the run-up to the vote.

Tea Party-aligned Sen. Mike Lee, R-Utah, said the new debt the country is assuming in order to pay existing obligations will take "decades to pay off," and complained that the package will not require a balanced-budget amendment. He voted against the package, one of 19 Republicans to do so.

Seven Democrats also opposed the bill.

The House passed the deal 269-161 in an eleventh-hour vote Monday, which also was notable for marking Rep. Gabrielle Giffords’ return to Capitol Hill. The Arizona representative hadn’t been in the House since January, when she was critically injured in a shooting rampage in Tucson. Giffords was met by loud applause on the House floor and voted yes.

"I had to be here for this vote. I could not take the chance that my absence could crash our economy," Giffords said in a statement.

Congress had until the end of the day Tuesday to raise the $14.3 trillion debt ceiling in order for the Treasury to be able to continue paying all its bills. Doing nothing would risk defaulting on the nation's debt for the first time.

House Speaker John Boehner had to rely on a blend of Republicans and Democrats to push the bill through his chamber the day before, with some conservatives unhappy about key provisions in the compromise.

House Democrats didn't want to carry Republicans' water, though. While 95 Democrats voted for the bill, an equal number voted against. A total of 174 Republicans supported the bill, while 66 voted against it.

Liberal Democrats were unhappy in part because the first phase of the plan relies solely on spending cuts -- $900 billion worth of them.

The second phase of the plan relies on a special committee to come up with roughly $1.5 trillion in additional deficit reduction. Both sides are wary about what that process could produce, in terms of entitlement reform and tax reform.

And conservatives are particularly agitated about a provision that would enact sweeping defense cuts if the committee's recommendations are not approved by the end of the year. Plus some are peeved that, while the package would call for a vote on a balanced-budget amendment, it would not require its approval in order for the debt ceiling to be increased.

Still, a number of big-name lawmakers from both parties got in line behind the bill before the final votes.

In the second phase of the plan, the debt ceiling will be raised by $1.5 trillion if the committee recommendations are approved by the end of the year. The size of the increase could be smaller if the approved cuts are smaller.

Each of the GOP and Democratic leaders in the chambers will nominate lawmakers to the 12-member committee to report back in the fall. The vote, to take place by Dec. 23, would be an up-or-down vote with no amendments allowed.

Obama said everything will be on the table and both parties will find some of the cuts objectionable.

"Despite what some Republicans have argued, I believe that we have to ask the wealthiest Americans and biggest corporations to pay their fair share by giving up tax breaks and special deductions. Despite what some in my own party have argued, I believe that we need to make some modest adjustments to programs like Medicare to ensure that they're still around for future generations. That's why the second part of this agreement is so important," Obama said from the White House briefing room.