If you’ve ever seen an ad featuring ExxonMobil scientists handling beakers of green goo, the algae that will supposedly fuel the future, you’ve been the target of an oil company’s advertisement. Exxon isn’t trying to sell you a product, exactly — but it is hoping to sell you on the idea that it’s committed to a greener future.

Over the past 30 years, the world’s five biggest oil companies have forked over more than $3.6 billion for reputation-building ads like this one. “When we looked at the dollar amounts, we were sort of blown away,” said Robert Brulle, a visiting professor of environment and society at Brown University.

Promotional ad spending from Exxon, BP, Chevron, Shell and ConocoPhillips has fluctuated a lot over the years, so Brulle’s research team decided to figure out why. The results, published in the journal Climatic Change this month, suggest that oil companies pour money into promotional campaigns for two main reasons: to boost their reputation when they’re getting negative media coverage, and to influence policymakers when Congress is considering climate legislation.

Consider the Deepwater Horizon spill in 2010, when BP’s oil rig exploded, filling the Gulf of Mexico with nearly 5 billion gallons of oil. Unsurprisingly, the news coverage was not exactly favorable. BP’s spending on promotions ads jumped from just $10,000 the year before the spill to a whopping $168 million in 2010, adjusted for inflation.

Grist thanks its sponsors. Become one.

“If you want to make your case in a legal court, you gotta go get a lawyer,” Brulle said. “If you want to make your case in the court of public opinion, you gotta go get a public relations agent.”

It’s worth noting that Big Oil’s PR history is coming under increased scrutiny. In October, Massachusetts Attorney General Maura Healey sued Exxon, arguing in part that its advertising was misleading people into believing the oil behemoth was taking action on climate change. And earlier this month, the nonprofit legal group ClientEarth filed a complaint with the British authority that handles corporate rulebreaking for the Organization for Economic Cooperation and Development, an intergovernmental group of the world’s biggest economies, accusing BP of something similar.

Grist thanks its sponsors. Become one.

The rise and fall of oil spending on promotional ads over the last three decades roughly tracks the federal government’s interest in taking climate action. Big Oil ramped up its ad spending in 1997, around the time countries were working on the Kyoto Protocol, an international attempt to set legally binding cuts to greenhouse gas emissions. Spending didn’t drop until 2001, when President George W. Bush took office and withdrew from the treaty. A similar pattern happened leading up to 2010, when Congress considered the Waxman-Markey bill, which would have established a national cap-and-trade program. It died, and just like that, spending dropped.

Brulle et al. / Climatic Change

Oil companies could start matching their green words with action. Spain’s biggest oil and gas company, Repsol, committed to becoming a net-zero carbon emitter by 2050. And Exxon is actually buying solar and wind in West Texas … except it’s for powering Exxon’s expanding oil field operations.

The promotional ad campaigns are part of oil companies’ broader effort to burnish their image. Many corporations, for example, donate large sums to the arts, affiliating themselves with prestigious museums, galleries, and opera houses. In an analysis of its promotional efforts from 1970 to 1981, Mobil Corporation claimed to have molded the “‘collective unconsciousness’ of the nation” through its branding of things like PBS’ Masterpiece Theater. In 1973, the company’s chair, Rawleigh Warner Jr, remarked that one of the most “effective” strategies was to buy prime advertising space in the New York Times every week. “The space is large enough for essay-type ads,” he said before the Economic Club of Detroit, “and is an integral part of the editorial section that is ‘must’ reading for opinion leaders, policymakers, educators, journalists, legislators, business executives, and intellectuals.”

Oil companies have been criticized for putting profits over the environment for more than a century now, which means they’ve had a long time to figure out damage control. Back in 1904, Ida Tarbell, the famous investigative journalist, wrote The History of the Standard Oil Company. It exposed unfair practices, raised public fury, and was credited with leading to the breakup of Standard Oil’s monopoly. No wonder Big Oil is willing to shell out billions to boost its public image.

“You want to know one of the reasons we’re not acting on climate change?” Brulle asked. “$3.6 billion spent on corporate propaganda might have something to do it.”