LONDON (Reuters) - Nearly 40 years after the 1979 Islamic revolution saw the exit of Western oil companies from Iran, the Iranian oil sector faces yet another costly disruption after a series of interruptions from war, sanctions and diplomatic isolation.

FILE PHOTO: Malta-flagged Iranian crude oil supertanker "Delvar" is seen anchored off Singapore March 1, 2012. . REUTERS/Tim Chong/File Photo

Washington will reapply sanctions to Iran’s oil sector on Nov. 4, after ending its participation in an international deal governing Iran’s nuclear sector. Iran’s oil buyers outside the United States will stop or reduce purchases because of secondary sanctions applied on foreign companies that use the U.S. banking system.

Having lifted a self-imposed revolutionary ban on foreign investors in 1995, Iran has struggled to attract external investment for any sustained period.

The isolation caused by poor relations with the United States and, in recent years, Tehran’s efforts to develop a nuclear capability have prevented Iran building output capacity.

But huge reserves run by the National Iranian Oil Co have helped it cling to its position as one of the world’s five largest oil producers.

The United States stopped buying Iranian oil or investing in Iran’s oil industry in 1979 and has not resumed since.

Iran produces nearly 4 percent of the world’s daily oil supply and over the last 30 years has exported on average two-thirds of that.

The mid-1970s were the heyday of the Iranian oil sector, when its output accounted for 10 percent of global production.

It has never returned to the record 6 million barrels per day (bpd) it pumped in 1974.

In that year it pumped 70 percent of the amount produced by OPEC’s biggest producer, its regional political rival Saudi Arabia, and more than three times as much as its neighbor Iraq.

In 2012, when a first round of international nuclear sanctions was imposed, Iran’s output was only a third of Saudi Arabia’s, rising to 41 percent last year and just a little higher than Iraq’s.

Output dropped to a low of 1.5 million bpd in 1980, the year after Shah Mohammed Reza was overthrown, an event that caused the second oil shock across the economies of the West.

It took 23 years for Iran to restore 4 million bpd in 2003, with a post-revolutionary peak last year just short of 5 million bpd of crude and condensate combined.

Iran’s exports halved during the depths of the 2012-2016 international sanctions on its nuclear program.

It is unclear what proportion of Iranian crude sales will vanish from international markets after Nov. 4. The United States said on Friday it would temporarily spare from sanctions eight jurisdictions that import Iranian oil. The European Union would not be one of the eight, U.S. Secretary of State Mike Pompeo said.

This isn’t Iran’s first round of sanctions. It has devised ways to export oil under the radar, evading detection by switching off the transponders of its fleet of nearly 40 supertankers, using alternatives to the U.S. dollar for payment, or selling crude to private refiners, in small, harder-to-track parcels.