Image copyright AP Image caption John Boehner wields the gavel after surviving the vote

John Boehner has won another term as Speaker of the US House of Representatives, as Republicans take control of both chambers of Congress for the first time in eight years.

Mr Boehner survived a challenge from the party's more conservative wing, with 25 Republicans voting against him.

At the top of the Republican agenda is approval of the Keystone XL pipeline, which was the first bill introduced.

The party won a majority in the Senate during November's mid-term election.

Republicans already controlled the House of Representatives.

They have been angered by recent unilateral actions by Mr Obama including an executive action on immigration policy and a major shift in US policy on Cuba.

Both chambers convened at midday, as required by the US constitution, after an early morning storm that left the capital city covered in snow.

Image copyright Reuters

At the scene: Suzanne Kianpour, BBC News

The US Capitol was buzzing with the excitement of the "first day of school."

Inside the Senate chamber, there was an air of camaraderie - a rare feeling in polarised, partisan Washington.

"Enjoy the ceremonies," Mitch McConnell said in his first speech as Senate Majority leader. "Tomorrow we get to work."

At the mock swearing-in and photo-op with the vice-president and senators' families in the old chamber - the original home of upper house legislation and debate until the late 1800s - Vice-President Joe Biden was his usual joking self.

When it was the turn of Lindsey Graham, a staunch Obama critic, Mr Biden quipped: "I'm not doing the next one."

Image copyright AP Image caption In keeping with the cross-party bonhomie, Biden and Graham share a laugh

"Hard work awaits," said the new Senate majority leader, Mitch McConnell. "I'm really optimistic about what we can accomplish."

During prepared remarks on Tuesday, Mr Boehner said he wanted Mr Obama to work with Republicans on bills that have stalled in recent years.

But he also criticised unnamed fellow representatives for "shadow boxing and show business".

Image copyright AP Image caption Mitch McConnell now takes control of a still sharply divided Senate

The first bill to be introduced was the approval for Keystone XL, a controversial oil pipeline extension on hold for years.

It may have enough support to pass a procedural hurdle in the Senate but on Tuesday, the White House has said Mr Obama would veto the legislation if it came to his desk.

White House spokesman Josh Earnest said the legislation undermined a "well-established" review process and did not take into account a lawsuit still pending in the state of Nebraska over the pipeline's route.

The US president has used his power of veto twice in his six years as president, but has said he expects to use it more now that both chambers are controlled by Republicans.

Image copyright Reuters Image caption Environmental groups are unhappy about Keystone

Republicans are also set to take on Mr Obama's immigration policy changes through a funding fight, legislation to repeal or defund the health law often referred to as "Obamacare", and fast-track a Pacific trade deal.

Despite the likelihood of high-profile clashes, Republican leaders and the White House have signalled there might be co-operation on such trade deals, as well as tax reform and infrastructure spending.

Mr Obama could face pressure on the Trans-Pacific Partnership - a 12-nation trade deal that liberals like Elizabeth Warren and Bernie Sanders say benefits corporations at the expense of American workers.