Outside the boardroom of BP Plc’s headquarters on London’s swanky St. James’s Square, a display case houses the geological data from Masjid-i-Solaiman, Iran’s first oil well.

The discovery of crude in 1908 laid the foundations for the company that would become British Petroleum and opened one of the richest opportunities that Western oil companies have ever enjoyed in the turbulent Middle East. Since then, the industry’s history in Iran is intertwined with CIA-backed coups, colonial exploitation and the anti-Western resentment surrounding the 1979 Islamic Revolution.

Now, as Iran and the U.S. enter 11th-hour negotiations to reach a nuclear deal and ease sanctions, the Middle Eastern country is emerging again as a potential prize for Western oil companies such as BP, Royal Dutch Shell Plc, Eni SpA and Total SA. The Chinese can also be expected to enter the race, while U.S. companies, more burdened by sanctions and legacy, will be further down the pack.

“You look at the history of the oil companies, and that history is Iran,” said Nader Sultan, an oil consultant who ran state-owned Kuwait Petroleum Corp. from 1993 to 2004.

An appetite to return to Persia is understandable: Iran holds 10 percent of the world’s oil reserves — putting it No. 4 globally after Venezuela, Saudi Arabia and Canada and ahead of Iraq — and almost a fifth of gas reserves — second only to Russia. “Iran is the big prize,” said Oswald Clint, an oil analyst at Sanford C. Bernstein & Co. “The resource size is very attractive.”

Investment Needed

For Iran, the attraction is also straightforward: it badly needs investment and foreign expertise to raise its hydrocarbon production. The toxic combination of decades with little foreign involvement, both before and after sanctions, coupled with the devastating legacy of long Iran-Iraq war in the 1980s has crippled the country’s energy industry.

In interviews with current and former oil executives, consultants and diplomats, a consensus emerges: While Big Oil is eager to return to Iran if a nuclear deal is reached, an agreement on commercial terms could prove more difficult than is widely understood.

“The international oil companies want to come back to Iran, but only if the conditions are right,” said Robin Mills, an analyst at Dubai-based Manaar Energy Consulting who worked with Shell in Iran.

Rehabilitation Required

Iran’s challenge is easily seen. The country today pumps 2.8 million barrels a day, down from 4.5 million a decade ago and a peak of 6 million in 1974. Its large fields, including Gachsaran and Marun, have been in production for more than 50 years and are in “sore need” of rehabilitation, according to the International Energy Agency.

Worse, Iran has failed to develop much of its gas reserves. That’s allowed countries including Algeria, Australia and neighboring Qatar, with which it shares a field, to take market share. Without Western technology, it is unlikely Iran would be able to build liquefied natural gas, or LNG, plants that super-cool gas into liquid form for shipping.

The restoration of Western oil investment appears to be a priority for Iran in its nuclear talks with the U.S., U.K, France, Germany, Russia and China. A year ago, the new Iranian president, Hassan Rouhani, used a speech during the World Economic Forum in Davos to court the European oil majors.

Funds Estimate

Jason Bordoff is a former White House oil official who was involved in designing sanctions against Iran and is now at Columbia University. He says Iran needs anywhere from $50 billion to $100 billion in investment from foreign oil groups to boost output.

“The contract terms are important —- more so than many recognize,” he said, adding that European oil companies “were leaving Iran even before oil sanctions really hit in 2010-2012, and contract terms were key part of the reason.”

After a two-decade hiatus following the Islamic revolution, Tehran tried to lure back foreign oil companies in the early 1990s.

It first turned to the U.S., reaching a $1 billion deal with Conoco in 1995 that was almost immediately scrapped under pressure from the White House. After a false start with the American group, Tehran signed several deals with European majors including Total and Shell.

Buy-Backs

The contracts, known in the jargon of the industry as “buy-backs,” paid foreign groups as contractors for short-term assignments. Companies, though, soon complained the contracts — which lasted five to seven years — offered them insufficient returns.

Iranian Oil Minister Bijan Namdar Zanganeh has now come up with a new set of terms, called the “Iran Petroleum Contract” that he says are more attractive than the buy-back model.

On paper, consultants and lawyers who have reviewed the new contract agreed it does offer better terms. Crucially, some of the conditions are “similar to the tried and tested production-sharing agreements in the U.A.E. and Iraqi Kurdistan,” according to Adrian Creed and Amir Kordvani of law firm Clyde & Co. in London. That makes them familiar to foreign firms, they said.

Leonardo Maugeri, a fellow at Harvard University who was head of strategy at Eni while the Italian company worked in Iran, said: “Zanganeh knows the problem and the new formula he is designing is much more favorable.”

Energy Map

However, the new terms may be not enough. Yasser Elguindi, an oil analyst at Medley Global Advisors, a consultant, said the global energy map had “changed dramatically” since Iran last negotiated with the European oil majors in the late 1990s.

“Iran would have to compete to attract dollars with Iraq and other countries opening to international investors,” he said.

Iraq is now open to outside investors and Western oil companies are looking to invest in Mexico, which is allowing foreign investment in oil for the first time since 1938.

Homayoun Falakshahi, Middle East analyst at consultant Wood Mackenzie, said that $50 oil was prompting companies to focus on investments that deliver stronger returns.

“Iran is in a much weaker position than it was before,” he said.

BP, Shell and Eni declined to comment. Total didn’t respond to request for comment.

The final hurdle is more subtle, but firmly rooted: a long history of distrust.

Dominated Industry

For decades, BP’s predecessor, Anglo-Persian Oil Co., dominated Iran’s energy industry and, by extension, almost every aspect of the country’s political and economic life.

When Iran voted to nationalize British oil interests in 1951, London responded first with an oil embargo and later orchestrated a coup with the help of the CIA, codenamed ‘Operation Ajax,’ to overthrow Iran’s nationalist prime minister, Mohammad Mossadegh.

The coup, one of the pivotal moments in the toxic relationship between the west and Iran, succeeded. The nationalization was quickly reversed and a group of foreign oil firms, which included the forerunners of BP, Shell, Total, Exxon Mobil Corp. and Chevron Corp., effectively managed the day to day of Iran’s oil industry until the early days of what became the Islamic revolution of 1979.

Foreign oil companies and Tehran would need to straighten out that turbulent past that stretches all the way to the Masjid-i-Solaiman oil well. The perception among the foreign oil companies is that the history would be put aside. Sultan, the former head of Kuwait Petroleum, said Iranian leaders would play along too.

“There is a new momentum in Iran, and that momentum also includes a desire to show success in the oil front,” he said.