The controversial Keystone pipeline spilled more than 200,000 gallons of oil in South Dakota last month, prompting new pressure to slow pipeline development in the United States. Only weeks later, Republican lawmakers slipped a provision into a massive tax bill that could instead give the pipeline operator, TransCanada, a huge new tax cut.

The company is one of a handful of energy giants that set up master limited partnerships (MLPs) -- financial vehicles often used to shield energy investments from taxes. The investors in those vehicles — who are often the parent company or its subsidiaries — could receive a huge boost thanks to an eleventh-hour amendment added to the GOP tax bill by Texas Sen. John Cornyn. MLPs themselves are already exempted from corporate taxes, but Cornyn’s last-minute provision would cut income taxes on the money earned by the MLP partners.

The tax changes stand to enrich fossil fuel behemoths and their partners — many of whom recently delivered big campaign donations to Donald Trump and to groups backing Republican Party lawmakers.

“These MLP financial vehicles already operate at a tremendous tax advantage over other publicly-traded businesses, because they are the only public companies that are allowed to escape paying corporate income tax,” Edward Kleinbard wrote in The Hill Monday. Kleinbard is a University of Southern California law professor who served as the chief of staff for Congress’s Joint Committee on Taxation. “But that existing subsidy was insufficient for Sen. Cornyn, and now existing investors in such vehicles have been awarded a further windfall by becoming eligible for the new discounted pass-through tax rates sold as tax relief for Main Street business.”

Invented in the early 1980s, MLPs used tradable partnerships to shield businesses from corporate taxes, while simultaneously providing access to capital markets. Income passes through the MLP to partners, who then pay personal income taxes on the money they made. Worried about lost corporate tax revenue, Congress limited the MLP structure to certain industries as part of tax reform in 1986, including real estate, finance and energy. Today, oil and gas pipelines are commonly associated with MLPs.

“Most people think of MLPs as energy pipeline companies with an advantageous tax structure, which is an extreme simplification, but not untrue,” Alerian, an MLP research firm, explains on its website.

The energy industry, and specifically oil and gas interests, have benefited most from the structure. According to recent estimates by investment management giant Vanguard, the energy industry accounts for more than $400 billion in MLPs -- roughly 85 percent of MLPs’ total value. Eighty percent of that $400 billion is represented by “midstream” oil and gas interests — typically pipeline transport companies.

Over the last year, amid rising concern about climate change, the political battle over pipelines has intensified across the United States. Following the Keystone spill in South Dakota in November, the pipeline’s operator TransCanada won a key regulatory ruling in Nebraska — but now confronts the prospect of litigation. Likewise, Energy Transfer Partners’ Dakota Access Pipeline is now dealing with a court-ordered environmental review, pipeline projects in Florida, New Jersey, Virginia and Michigan also face mounting protests, and local resistance forced the cancellation of a planned pipeline through New England.

Despite that opposition, Congressional Republicans pushed various initiatives to boost the pipeline industry in recent years. In 2015, for instance, top Republicans tried to pass a bill to speed pipeline approvals — as they accepted campaign cash from one firm that stood to benefit from the legislation. A few months ago, House lawmakers once again passed legislation to expedite pipeline approvals.

The new tax bill — which has been defined by partisan battles over property taxes, mortgage interest deductions and corporate tax rates — had not been viewed as a central part of the larger pipeline policy debate. However, Republicans included provisions that would open up Alaska’s Arctic National Wildlife Refuge to drilling and also inserted the MLP language that would largely benefit fossil fuel firms.

The House version of the bill capped taxes on “pass-through” income (the money “passing through” partnerships like MLPs) at 25 percent — far less than the top marginal tax rate (39.6 percent) that partners would typically pay on income. The Senate bill keeps the top rate for pass-through income, but Cornyn’s amendment inserts a 23 percent deduction on “qualifying” pass-through income, which includes income from energy sector MLPs.

“It’s definitely a personal tax rate wrapped in a corporate provision, because for partners it is a personal tax advantage,” Ryan Alexander, president of Taxpayers for Common Sense, told IBT.

Trans-Alaska oil pipeline A buried section of the Trans-Alaska Pipeline , July 21, 2002 in Fairbanks, Alaska. The 800 mile pipeline carries crude oil from Prudhoe Bay to the ice free port of Valdez, Alaska. Photo: Barry Williams/Getty Images

Pipeline giants and their trade associations lobbied lawmakers on tax issues in the lead up to the votes on tax reform.

For example, the Master Limited Partnership Association, the trade group representing MLPs, spent $390,000 on lobbying in the first three quarters of 2017. Energy Transfer Partners, operators of the Dakota Access Pipeline, spent $750,000 and recently hired a former top Treasury official to lobby on tax issues. Enterprise Products Partners, the MLP with the largest market capitalization, spent $240,000 lobbying on “partnership and individual tax issues involving Publicly Traded Partnerships” and “final qualifying income regulations.”

Some of the biggest master limited partnerships — whose investors could benefit from the changes — are linked to several of the Republican Party’s biggest donors, according to data compiled by the nonpartisan Center for Responsive Politics. That includes:

 —Energy Transfer Partners: CEO Kelcy Warren delivered more than $1.5 million to conservative super PACs in the 2016 election, and was a top contributor to President Trump’s campaign. The company’s employees and political action committees have given more than $1 million to GOP lawmakers and party groups since 2016. The company operates more than 71,000 miles of pipelines.

 —Western Refining: CEO Paul Foster in May gave $1 million to the Congressional Leadership Fund, whose website describes it as “exclusively dedicated to protecting and strengthening the Republican Majority in the House of Representatives.” Foster also gave more than $367,000 to the National Republican Senatorial Committee in 2016. Western Refining and its master limited partnerships were recently acquired by Andeavor.

 —TransCanada: Donors from the Keystone operator gave more than $204,000 to Republican lawmakers in the election preceding the tax change for MLPs. By contrast, the company contributed a total of just $22,025 to all federal lawmakers between 2008 and 2014.

 —Dominion: The company and its political action committees have given more than $1 million to Republican congressional candidates since 2016. Dominion oversees an MLP, and its mid-Atlantic pipeline project has sparked opposition.

Many of the fossil fuel firms operating MLPs are based in Texas and have supported Texas Republican lawmakers such as Cornyn and Ways and Means Committee Chairman Kevin Brady. Donors from Valero and Energy Transfer were among Cornyn’s top donors in 2016. That year, Brady was Congress’s second biggest recipient of donations from Energy Transfer.

“The MLP rules have helped these companies avoid corporate-level taxation for decades,” Doug Koplow, founder of Earth Track, an organization that tracks energy subsidies, told International Business Times. “Under the tax bill the tax burden on the partners of the MLPs is going to be reduced as well.”