Media playback is unsupported on your device Media caption Tourists express joy at the reopening of Washington attractions

Hundreds of thousands of US government employees are back at work after President Barack Obama signed a law ending a 16-day government shutdown and extending the US debt limit.

The cross-party deal came hours before the US government risked running out of money to pay its bills.

"There are no winners," Mr Obama said, adding the US would "bounce back".

The deal followed 16 days of partial government shutdown, which began when Congress failed to agree on a budget.

Analysis Perhaps the president has a tin ear when it comes to understanding the concerns of his opponents. But this is probably more about positioning, ahead of next year's midterm elections. If he does get deals done, then he and the Democrats look good. But if it all ends in chaos and more obstruction, he's already told voters who is to blame and what is at stake. By posing as the only adult in a room full of squabbling children, he's more likely to make their tantrums worse in the future. And the voters may have had enough of hysterics.

Congress voted through the deal less hours before a deadline to raise the $16.7tn (£10.5tn) debt limit.

The measure approved in Washington funds the government to 15 January, and extends the US Treasury's borrowing authority until 7 February.

The deal does not resolve the budgetary issues that fiercely divide Republicans and Democrats. Instead, it establishes a cross-party committee of legislators tasked with crafting a long-term budget deal and reporting back to Congress by mid-December.

A faction of Republicans in the hardline Tea Party movement had pushed for the confrontation as a way to gut Mr Obama's healthcare reform.

Unnecessary damage

However, Mr Obama and the Democrats refused to negotiate, and the law commonly known as Obamacare escaped relatively unscathed.

Media playback is unsupported on your device Media caption Workers said they were "pleased and excited" to get back to the office

On Thursday, Mr Obama thanked congressional leaders for their help ending the government shutdown and raising the debt limit, but said both had "inflicted completely unnecessary damage on our economy".

"Nothing has done more to undermine our economy the last three years than the kind of tactics that create these kinds of manufactured crises," he said.

Mr Obama said politicians had to stop listening to "talking heads" and activists "who profit from conflict" and instead focus on growing the economy and creating a responsible budget.

"The American people are completely fed up with Washington," he said. "How business is done in this town has to change."

Mr Obama called the political crises "a spectacle" which had hurt America's credibility in the world.

And to the conservative Republicans who pushed the showdown as a way to extract policy concessions, he said: "Go out there and win an election."

Politicians, bankers and economists had warned of global economic calamity unless an agreement to raise the US government's borrowing limit were reached.

IMF head Christine Lagarde's positive response to the news was tempered by a call for further action.

"It will be essential to reduce uncertainty surrounding the conduct of fiscal policy by raising the debt limit in a more durable manner," she said in a statement.

Economists have estimated the shutdown cost the US economy billions of dollars.

Sacrifices

The shutdown affected Americans and visitors to the US in countless ways: most national parks were closed, medical research ground to a halt, and ordinary paperwork went unfinished, delaying visa applications, business permits and safety inspections.

Media playback is unsupported on your device Media caption President Obama: "How business is done in this town has to change."

Hundreds of thousands of employees were put on leave without pay during the shutdown, with many forced to delay purchases or even payment of routine bills. A few days into the shutdown Congress passed a law ensuring they would receive back pay.

Before dawn on Thursday, the US Office of Personnel Management, which manages the federal workforce, announced in a terse statement on its website that government workers should return to work as regularly scheduled.

A senior manager at the Department of the Interior, which oversees the national parks system and other public land, reminded employees to disable "out of office" email messages, change voicemail prompts, and "check on any refrigerators and throw out any perished food".

"We appreciate your sacrifices through these difficult times and we understand that the lapse in government activities has imposed hardships on you, your families, and the people we serve," Rhea Suh, assistant secretary for policy, management and budget, wrote.

Federal workers returning to the downtown Washington DC office of the Environmental Protection Agency (EPA) were greeted by Vice-President Joe Biden and a welcome note from their boss, agency head Gina McCarthy.

'Down the toilet'

World press reaction New York Times editorial: "The Republican Party slunk away on Wednesday from its failed, ruinous strategy to get its way through the use of havoc"

editorial: "The Republican Party slunk away on Wednesday from its failed, ruinous strategy to get its way through the use of havoc" Commentary in China's The Nan Fang Daily : "If we want to get out of this passive unfavourable situation in the long term, we can only reduce the role of the US dollar and the US debt in the global market"

: "If we want to get out of this passive unfavourable situation in the long term, we can only reduce the role of the US dollar and the US debt in the global market" Philippe Gelie in France's Le Figaro: "The spectacle presented in Washington over the last few weeks goes beyond the excessive taste of the Americans for political drama" Reaction in full

A security officer at the building said the shutdown had been "depressing" and had made her realise how much she enjoyed her job.

"I enjoy checking in 500 people every day," said Ettereteen Welch.

Spurred on by hardline conservatives, congressional Republicans forced the stand-off by linking budget measures to healthcare reform.

Despite reluctant support from the House Republican leadership for the bill approved on Wednesday, most of the party's lawmakers in the House voted against it.

Republican Congressman Mo Brooks told the Associated Press news agency the law that ended the shutdown merely delayed the fight.

"We need to get to the underlying cause of the problem, which is our out-of-control spending and deficits," he said, "and fix it before it's too late and we go down the toilet to bankruptcy. Because that's where America is headed."