WASHINGTON — Optimistic Republicans assumed full control of Congress on Tuesday for the first time in eight years in a day of pomp, circumstance and raw politics beneath the Capitol Dome.
Before the new Congress was two hours old, a veto showdown with President Barack Obama was set as the White House announced he would reject legislation approving the long-stalled Keystone XL pipeline, which Republicans intend to advance.
"Hard work awaits," said the new Senate majority leader, Mitch McConnell of Kentucky. "I'm really optimistic about what we can accomplish."
House Speaker John Boehner, who faced down a tea party challenge and won re-election Tuesday by his colleagues, said the GOP will seek Obama's support for measures on jobs, energy and veterans. "It will be a sign the logjam is breaking," Boehner declared.
At the White House, Obama congratulated the pair and said he was looking forward to working with them.
"There are going to be areas where we disagree, and there will be some pitched battles, but I'm also confident that there are enormous areas of potential agreement," Obama said. "I wish them well and I think we're going to hopefully have a productive 2015."
As the first snowfall of the winter blanketed Washington, Congress convened at noon as required by the Constitution.
On the Senate floor, newcomers mixed with veterans as Vice President Joe Biden swore in senators in groups of four. McConnell ascended to majority leader, his elevation endorsed by rank-and-file Republicans last year after they won control of the chamber from the Democrats.
Across the Capitol in the House, a similar scene unfolded as familiar faces and new ones crowded the aisles and lawmakers of both parties recited the Pledge of Allegiance. But in the House, there was an element of suspense as Boehner faced a tea party-backed effort to unseat him.
It came up short, but the 25 defections was a historically high number for a sitting House speaker. It served notice that the conservative faction that has been a thorn in Boehner's side for the past two sessions of Congress will not fall quiet during the new one despite the GOP's bigger control.
Seeking unity despite the internal party dissension, the GOP moved swiftly to advance the Keystone XL pipeline, setting votes in a Senate committee and on the House floor for later this week.
After months of equivocating, the White House announced Tuesday that Obama would not sign the bill. Spokesman Josh Earnest said there is a "well-established" review process that is being run by the State Department that should not be undermined by legislation. "If this bill passes this Congress, the president wouldn't sign this bill," Earnest said.
It was a preview of things to come as both sides positioned themselves for two years of clashes and, perhaps, occasional cooperation that will help shape the outcomes of the 2016 presidential and congressional elections. Obama planned to meet with the new congressional leaders at the White House next week.
McConnell replaces Democrat Harry Reid of Nevada, who was a surprise no-show from the day's proceedings after he injured himself exercising.
Reid, who broke several ribs and bones in his face when a piece of equipment snapped last week, said his doctor had ordered him to work from home Tuesday. A photo Reid posted to Twitter showed him with his right eye taped over as he met with lawmakers. His office also disclosed that he had suffered a concussion in the accident.
Newcomers and veterans alike lifted their hands to swear the oath of office, many with spouses, children and grandchildren looking on to witness the biennial display of pageantry. The spectacle drew political veterans back to the Capitol as former Vice President Walter Mondale, a Democrat, and former Senate Majority Leader Bill Frist, a Republican, mixed with lawmakers on the Senate floor.
McConnell and Boehner sought to move quickly to legislative battles ahead, but first, Boehner had to survive his re-election as speaker — the main event on any opening day's agenda.
Tea party-backed Reps. Louie Gohmert of Texas and Ted Yoho and Daniel Webster of Florida were nominated by colleagues as challengers to Boehner. The ranks of the opponents grew in the hours ahead of Tuesday's vote, and unexpected dissenters materialized during the lengthy televised roll call vote in the House chamber.
But the challenge fell far short, and many lawmakers dismissed it as a needless distraction at a moment when the party should be showing voters it can lead.
"It's time to put all this silliness behind and move on," said Rep. Phil Roe, R-Tenn. "We're on probation. If we don't perform ... (voters) can make a pivot in a heartbeat."
The 65-year-old Boehner's hand is strong after the Republicans' sweeping electoral triumph. The party will hold 246 House seats in the new Congress, to 188 for the Democrats, the biggest GOP majority in nearly 70 years.
Coupled with the commanding majority was word of the first retirement — New York Republican Chris Gibson announced he would step down at the end of his term.
The intraparty leadership struggle underscored the political peril facing Republicans as they looked ahead to two-house control of Congress. Yet the evident ability to pass the Keystone pipeline legislation showed their potential to advance an agenda.
The pipeline passed the House but died in a Democratic-led filibuster in the Senate late last year. Now, Republicans appear to have more than enough votes to clear it through the Senate as well, given the Republican pickup of nine seats in the elections.
But with Obama prepared to block the measure, Republicans would need significant Democratic support in both chambers to override his veto, something that would be hard to muster.
Associated Press writers David Espo, Nedra Pickler, Charles Babington and Stephen Ohlemacher contributed to this report.