Senate Republicans recently lost, by four votes, an attempt to get the green light for the $7 billion Keystone Pipeline that would bring oil from Canada to the United States. Besides influencing many polarizing issues in American politics, such as jobs, energy prices, and the environment, the political result will also have a big influence on the valuation of the pipeline’s builder TransCanada Corporation (TRP).

The Keystone project requires the construction of two stretches to be complete. One segment would require federal approval since it crosses America’s northern border. It would run from Hardisty in the Alberta province of Canada, bringing along with it petroleum (mainly from Canadian oil sands, but also from Montana and North Dakota), and continue along until it hits an existing pipeline at Steele City, Kansas.

Environmental groups are against this segment. They say it threatens the Ogallala Aquifer, which supplies water to eight states. In February, environmentalists bombarded the U.S. Senate with a reported 800,000 messages against the project. A recent modification to TransCanada’s plans sports a detour around the sensitive Sand Hills, Nebraska region.

The other stretch, the so-called “Cushing MarketLink”, is less controversial. It would pick up from Cushing, Oklahoma to terminate at the Gulf of Mexico at Nederland, Texas. There is currently a large glut of oil backed up at Cushing from up north, namely the Canadian oil sands, and the Bakken shale formation of Montana and North Dakota. For this reason, West Texas Intermediate is trading at an (historically unusual) almost $20 discount to Brent crude oil sourced from the North Sea. The Cushing MarketLink could bring some of that West Texas Intermediate oil further south to be exported using the infrastructure in place at the Gulf. However, this segment faces competition from an early entrant, Enbridge (ENB). Enbridge recently bought the Seaway pipeline, and plans to reverse its course from the Gulf of Mexico to Cushing, so that it runs from Cushing to the Gulf of Mexico starting June 1st. Both the Seaway and the Cushing MarketLink hope to “relieve” the glut of relatively cheap oil currently in the Midwest, so these two pipelines will be in direct competition.

Other companies besides TransCanada stand to benefit if the Keystone Pipeline is completed. Namely, those with refineries at the pipeline’s final destination at the Gulf Coast should capitalize on marketing the cheaper oil coming in; this includes big names such as ExxonMobil (XOM - Free Exxon Stock Report), Royal Dutch Shell (RDS/A), the biggest independent oil refiner in America Valero Energy (VLO), and Marathon Oil (MRO), another refiner.

Alternate oil transporters, on the other hand, would lose out. For example, Tidewater (TDW) has the world’s largest fleet dedicated to the petroleum industry. Railroad companies such as Berkshire Hathaway’s (BRK/B) biggest acquisition to date, Burlington Northern Santa Fe LLC, would also lose oil-transport business.

Different sides continue to argue the costs and benefits of the pipeline. In the Midwest, where some Democratic Senators are wavering, construction workers would benefit from the stimulus of more temporary jobs. Republicans say the pipeline would reduce our dependence on foreign oil from more volatile regions in the Middle East, and lower energy prices by bringing in oil from our Northern ally. Others point out that reducing the glut of oil in the Midwest with new pipelines may actually increase oil prices there.

It seems like the fight will continue to drag on. Republicans will likely continue to support the bill, while Democrats will likely stand against it. As the election draws closer, however, the issue may become more of a bargaining chip to politicians than an ideological issue.

At the time of this article’s writing, the author did not have positions in any of the companies mentioned.