Sen. Lisa Murkowski (R-Alaska) has been a leader in the pushing to lift the oil export ban. (Photo by Andrew Harnik for The Washington Post)

For oil and energy lobbyists who for years have worked to convince Congress to end a decades long ban on crude oil exports, the tide shifted in their favor this past summer with the help of an unlikely ally: the White House.

In July, the Obama administration and other world powers announced an end to sanctions against Iran as part of a deal to curb the country’s nuclear capabilities, which led Tehran to later say it will soon double its crude oil exports.

This gave the oil industry some crucial political leverage.

“When the administration lifted sanctions on Iran, that was one of the turning points,” said an energy lobbyist who is pushing to end the U.S. export ban. “We’re going to let a regime like Iran sell oil on the global market, while [U.S. companies] couldn’t?”

Congress is now on the brink of lifting the ban after language to do so was included in the $1.1 trillion spending bill to fund the government through September that the House and Senate are expected to pass on Friday.

The removal of the export ban would mark the culmination of an aggressive, multi-year lobbying campaign that leveraged political and economic circumstances to its advantage.

Domestic oil production has nearly doubled since 2008, largely because of the shale oil boom in North Dakota and Texas that led to an overabundance of light crude oil. Most refiners in the United States are configured to process heavy or medium crude oil, leaving the producers of light crude oil with too much product and not enough refineries to buy it. Over the last 18 months, sustained low oil prices forced many producers to lay off workers and reduce operations. That made for an environment where, politics aside, a strong economic argument could be made for removing the ban, first imposed in 1975, to allow producers to sell to foreign refineries.

Then, when the United States lifted Iranian sanctions on crude oil exports, another piece fell into place for the industry’s campaign.

The lobbying effort began in earnest two years ago.

Led by a handful of oil and energy companies — Hess Corp., Devon Energy, ConocoPhillips, Marathon and Continental Resources — and the American Petroleum Institute (API), the campaign generated hundreds of thousands of dollars in lobbying fees for K Street strategists. The companies, API and their allied lobbying coalition enlisted the help of at least 11 lobby and consulting firms in Washington to sell their message to Capitol Hill, the media and the public.

The firms on the bankroll include Forbes Tate, Harbinger Strategies, CGCN, FTI Consulting, Alston & Bird, Harlow Government Relations, Bluewater Strategies, Heather Podesta + Partners, Ogilvy Government Relations and Williams & Jensen, according to lobbying records. The lobbyists include at least three former aides to former House Speaker John Boehner (R-Ohio), who in July came out in support of ending the ban; three former members of Congress; and a former aide to Sen. Lisa Murkowski (R-Alaska), who along with Sen. Heidi Heitkamp (D-S.D.) is credited for engineering the congressional push to repeal the ban.

Although the expected repeal is considered a win for API, which represents the U.S. oil and natural gas industry, the group itself was actually split on the issue because oil producers wanted to lift the ban, while many refiners did not.

Oil producers would benefit from ending the ban because it would give them access to a larger market to sell crude oil. But refiners, which convert crude oil into gasoline and other refined products and can already export refined products, would not because they now enjoy wide profit margins because of low oil prices and high consumer demand for gasoline.

The CEOs of 16 oil producers formed a single-issue lobbying coalition, PACE (Producers for American Crude Oil Exports), to focus all its energy on repealing the ban. The coalition hired lobbyist George Baker of Williams & Jensen to serve as the group’s executive director. It plans to disband once the export ban question is resolved.

Their early game plan was to court any and all lawmakers willing to take a meeting. They found an especially receptive audience in legislators representing states that produce energy — North Dakota, Texas, Alaska, Ohio and Pennsylvania — that had been hit hard by job losses in the energy sector. Their pitch to lawmakers was that ending the ban would help create more energy jobs and spur economic growth back home.

They came armed with data, citing government, industry and academic reports, including an analysis by the business research and consulting firm IHS, that projects potential job gains and tax revenue increases in every state and congressional district if the ban is lifted. Some studies were funded, in part, by the oil industry.

“Lifting the ban on U.S. crude oil exports would create American jobs, bolster the U.S. economy, and benefit consumers,” API president Jack Gerard wrote in a letter to congressional leaders Wednesday. “Lifting the ban would create 1 million jobs at its peak in 2018, and add $38 billion to our economy, and lower our trade deficit by $22 billion and our federal budget deficit by $1.4 billion in the coming years.”

PACE also commissioned a poll that found 69 percent of American voters support allowing U.S. oil producers to sell crude oil to customers in countries that are trading partners. Oil and energy industry executives, including Hess CEO John Hess, wrote op-eds in newspapers supporting a repeal.

In Congress, the needle began moving gradually, led by the North Dakota and Texas delegations. In January 2014, Murkowski, speaking at a event hosted by the Brookings Institution, became the first congressional Republican to call for a loosening of the ban.

[U.S. oil exports have been banned for 40 years. Is it time for that to change?]

The sell was easier among Republicans. The lobbying coalition recruited the support of Reps. Kevin Brady (R-Texas), Mike Conaway (R-Texas), Randy Neugebauer (R-Texas) and Kevin McCarthy (R-Calif.) and Sen. John Cornyn (R-Texas), who said Wednesday that lifting the ban “would serve as a shot in the arm to a sluggish economy, and will open up new markets for job creators in Texas and across the country.”

Getting Democrats to wrap their heads around the idea that lifting the ban wouldn’t be environmentally damaging was harder. Politically, it helped that in July, two major labor groups, Laborers’ International Union of North America (LIUNA) and the International Union of Operating Engineers, began backing the repeal, saying it would help create more jobs.

In February, Rep. Joe Barton (R-Texas) — with support from Reps. McCaul (R-Texas) and Kevin Cramer (R-N.D.) — introduced a bill repealing the ban that passed the House in October.

In May, Sens. Heidi Heitkamp (D-N.D.) and Murkowski (R-Alaska) introduced a similar measure, and that language was ultimately incorporated in the spending bill.

On Friday, if the year-end spending bill pass, the oil industry’s campaign will be complete.