U.S. President Barack Obama signed a deadline-beating debt ceiling bill on Tuesday, averting an unprecedented default on the government's loans that he said would have been "devastating" for the country's economy.

Speaking moments before he signed the bill into law, the president called the deal an "important first step" to ensuring the country lives within its means.

But Obama also condemned what he called a "manufactured crisis" in Washington over raising the $14-trillion debt ceiling that he said only made things worse for the country's economic recovery.

"It was something we could have avoided entirely," Obama told reporters in a terse statement delivered in the Rose Garden of the White House.

Obama said the compromise now requires both parties to work together in the future on a larger plan to cut the deficit for the long-term health of the U.S. economy — a plan that can't rely just on spending cuts.

"You'll need a balanced approach where everything is on the table," he said.

300-mcconnell-01068443

Senate Republican leader Mitch McConnell says the deal is a 'crucial step' to getting America's 'fiscal house in order.' (Jacquelyn Martin/Associated Press)

Part of that balance, the president said, means making some adjustments to protect health-care programs like Medicare and reforming the tax code to ensure the wealthiest Americans and biggest corporations "pay their fair share."

His remarks came after the Senate voted 74-26 in favour of the bill, which raises the government's debt ceiling by at least $2.1 trillion and cut federal spending by $2.4 trillion over 10 years. On Sunday, members of the House of Representatives passed the bill, with some liberal Democrats and Tea Party conservative Republicans opposing it.

The legislation, backed by Obama, Democratic Senate majority leader Harry Reid and Republican leader Mitch McConnell, comes after a tense week of public sabre-rattling and extensive private negotiations between Democrats and Republicans. The impasse in Washington shook world markets' already flagging confidence in America's credit rating.

In an attempt to quell a schism within Republican ranks ahead of the vote, McConnell credited the conservative tea party-backed Republican lawmakers who steadfastly refused to back the deal with having "changed the terms of the debate" and succeeded in pushing their agenda.

"The American people sent a wave of new people to Congress in last year's election with a very clear mandate: to put our nation's fiscal house in order," he said. "And I want to assure you today that although you may not see it this way, you've won this debate."

The Democrats' Reid, in turn, told the Senate the compromise was "unfair" but necessary to avert "disaster." Reid also hit out at the same conservatives McConnell praised for putting the American economy at risk with their consistent attempts to block a pact.

"I welcome the new members, but the result of the tea party direction in this session has been very disconcerting and unfair to the American people," Reid said. 

Markets drop

Despite the deal, global stock markets tumbled Tuesday  after data fuelled fears the U.S. might be sliding back into recession. The decline followed the release Monday of a disappointing survey of U.S. manufacturing activity that indicated a slowdown.

The debt compromise bill would extend the current $14.3 trillion debt limit by up to $2.1 trillion and cut federal spending by $2.4 trillion, without imposing tax increases — a key Republican demand.

The measure would also establish a 12-member House-Senate committee to produce up to $1.5 trillion in additional cuts over a decade. Congress would be required to vote on the panel's recommendations without possibility of changes.

si-gifford-300

U.S. Representative Gabrielle Giffords surprises colleagues Monday night by appearing in the House for the first time since being shot in the head in January to vote on the debt-ceiling bill. ((House Television/Associated Press))

But if the panel deadlocks or can't produce at least $1.2 trillion in savings, then spending cuts would take effect across much of the federal budget. The Pentagon, domestic agencies and farm subsidies would be affected, as would payments to doctors and other Medicare providers. Individual benefits under Social Security, Medicaid, Medicare and programs for veterans and federal retirees would be exempt.

At the same time, the debt limit would rise by at least another $1.2 trillion and, perhaps — depending on the results of the committee's work — by as much as $1.5 trillion.

Some conservatives were upset the spending cuts do not go far enough in some areas, while Liberal Democrats were angered over the domestic spending cuts and lack of tax increases on the wealthy.

After a tense weekend of bargaining, Obama and congressional leaders  announced the agreement Sunday night.

The Republicans' McConnell said he understood the past few weeks in Washington might have some Americans thinking their government wasn’t working.

"America's political process was never meant to be pretty," he said. "That's what checks and balances is all about."

With files from The Associated Press