As the House Energy and Commerce Subcommittee on Energy and Power takes up legislation Wednesday to force approval of the Keystone XL pipeline extension, the bill raises a key question: can Congress wrest the Keystone decision away from President Obama?

The answer: Neither side knows exactly, but depending on the legislative language, Congress could very well pull it off.

The Northern Route Approval Act, the subject of Wednesday’s hearing, would grant TransCanada a permit to build a 1,179-mile pipeline between Hardisty, Alberta, and Steele City, Okla., to ship crude oil from Canada’s oil sands region. The company is moving ahead with the project’s 485-mile southern leg — known as the Gulf Coast Project, between Steele City and Port Arthur, Tex. — which is two-thirds built and has all the necessary federal permits.

The State Department is in the midst of an extensive environmental and national interest review of the pipeline, which supporters say will help meet America’s energy and economic needs, and which opponents say will accelerate climate change. That review will continue for several months, and the president is expected to make a final decision by either the late summer or early fall.

Congress tried to force Obama’s hand more than a year ago on this: they imposed a February 2012 deadline on the president for a final decision, and in response he rejected the permit, arguing it did not provide his deputies with enough time to do a full review of the project.

While the new House bill could face a similar problem if it passes both chambers before Obama rules on the permit, the more salient question is what would happen if the president rejects TransCanada’s permit application and the House and Senate respond by passing a bill by veto-proof majorities that effectively grants the pipeline a permit.

“Congress could still deem it approved,” Rep. Lee Terry (R-Neb.), the bill’s author, told reporters Tuesday.

Susan Casey-Lefkowitz, who directs the Natural Resources Defense Council’s international program, said her group wouldn’t hesitate to challenge such a move in court.

"Should Congress decide to set aside a decision by the president to deny the Keystone XL tar sands pipeline, we would push back in every way possible, including researching the legality of such an effort to undermine a decision-making process that included public participation by hundreds of thousands of Americans," she said.

The Congressional Research Service has examined this question in two separate reports, and in a 2012 report, it suggests Congress has just as much a right to weigh in on international pipelines as the president.

That report notes, “Article I, Section 8 of the Constitution authorizes Congress to ‘regulate Commerce with foreign Nations.’ Whereas any independent presidential authority in matters affecting foreign commerce derives from the President's more general foreign affairs authority, Congress's power over foreign commerce is plainly enumerated by the Constitution, suggesting that its authority in this field is preeminent.”

Now, just to complicate matters, a 2013 CRS report notes that a 2010 ruling by the U.S. District Court for the District of Minnesota found the president had the right to issue international pipeline permits because Congress had not challenged this authority over a period of several years.

“The court also noted that these permits had been issued many times before and that ‘Congress has not attempted to exercise any exclusive authority over the permitting process. Congress’s inaction suggests that Congress has accepted the authority of the President to issue cross-border permits’” the 2013 report reads. “Based on the historical recognition of the president’s authority to issue these permits and Congress’s implied approval through inaction, the court found the Presidential Permit requirement for border facilities constitutional.”

Ironically in that case — Sierra Club v. Clinton — it was an environmental group challenging the Clinton administration’s ability to oversee an international pipeline. Now, the Sierra Club and other environmental groups are pushing for Obama, rather than Congress, to have final authority on the question, but that probably reflects the fact that Democrats had control of both chambers of Congress when the Sierra Club was suing over the Alberta Clipper pipeline decision.

On the political front, do backers of Keystone XL have the 67 votes in the Senate and 290 votes in the House to override a presidential veto? Not quite: on March 22 the Senate approved a non-binding resolution in favor of building the project by a vote of 62 to 37, with 17 Democrats voting in favor.

So in the end, can Congress grant a permit to the pipeline even if Obama rejects it? It appears proponents may be able to force the project through, if they can attract a few more Democrats to their side, but they would still have to fight in federal court to seal such a victory.