(Recasts, adds background, political context, details from ruling)
By Aruna Viswanatha and Patrick Rucker
WASHINGTON, Jan 9 (Reuters) - The Nebraska Supreme Court on Friday removed one of the last hurdles for President Barack Obama to settle the fate of the politically charged Keystone XL oil pipeline, delivering a closely watched decision on an issue that could help define his second term.
After months of deliberation, the court allowed a route for the pipeline to cross the state, shifting the debate over TransCanada Corp's controversial line fully to Washington, where Republicans now in control of Congress are seeking to force its final approval after more than six years of acrimony with the White House.
The ruling came hours before the U.S. House of Representatives planned to vote on legislation approving the pipeline, which would help carry up to 830,000 barrels of oil per day from Canada's oil sands to Gulf Coast refineries.
The Senate is expected to take up a Keystone bill for debate next week.
In Nebraska, the legal question narrowly focused on whether the governor had a right to bless a pipeline route, but the state supreme court has had the matter since February and the 64-page ruling reflects how contentious it has become.
The court said it could not decide whether legislation backed by former governor Dave Heineman wrongly gave him authority to grant TransCanada a pipeline route in 2012. But the court was deadlocked, which amounted to ruling in the company's favor.
"(B)ecause there are not five judges of this court voting on the constitutionality of (the legislation), the legislation must stand by default," the seven-judge panel said in its ruling.
The pipeline debate has energized environmentalists who see it as an emblem of fossil fuel dependence and energy interests who see a Canada-to-Texas pipeline system as a tool to spur energy production in North America.
President Barack Obama has said he could not endorse a project that meaningfully worsens climate change and the issue could become one of the more controversial of his second term.
But the issue may well be settled in the Congress where Republicans have vowed to push the issue over Obama's threatened veto.
"Today's ruling provides the perfect opportunity for the President to change his unproductive posture on this jobs-creating infrastructure project," said Senate Majority Leader Mitch McConnell, a Republican from Kentucky.
The court's decision allows the U.S. State Department to decide whether the pipeline meant to carry Canadian oil sands fuel would be in the national interest, a necessary step for the cross-border energy project.
Environmentalists oppose Keystone since it could help expand oil sands development and President Barack Obama has said he will weigh whether the project might worsen climate change.
Officials had said they could not test whether the project is in the national interest before the Nebraska Supreme Court ruled. Friday's decision cleared the way.
Three members of the Nebraska panel said they believed the landowners who initially challenged the legislation did not do so properly, and declined to offer an opinion on whether it was constitutional.
The other four judges said they believed the law, which allowed the governor to bypass regulatory procedures and approve the route himself, unconstitutional. But the court said it required five judges to agree in order to rule on whether a legislative enactment was constitutional, and left the law in place by default. (Timothy Gardner in Washington contributed; Editing by Alden Bentley)