VOLGOGRAD, Russia — At a sprawling pipe factory in this gritty industrial town, an exhibit of Surrealist art, featuring reproductions of Mondrian, Malevich and Magritte, lines the walls. One of the company’s biggest shareholders, a collector of Surrealist works, says the art will stretch engineers’ minds and unlock workers’ creativity.

Commentary at the exhibit gets to an existential debate with Shakespearean flair: “Tube or Not Tube?” It is a fitting question for the factory owner, the Tube Metal Company, the biggest supplier of pipes to and producers.

Like many players in the oil patch, the Tube Metal Company, or TMK for short, is being hurt by weak energy prices. With oil dipping below $29 a barrel, TMK has been pulling back in the United States and elsewhere.

But TMK contends it has an edge in a relatively untapped market, Iran, a country with warm political relations with Moscow that has tens of billions of dollars in newly unfrozen, shah-era money to spend on oil infrastructure. During the Soviet era, TMK was the dominant provider of pipes to Iran.

Russian companies are broadly gearing up to get back into Iran.

Sukhoi wants to sell its Superjet airliners to a market starved for transportation. Avtovaz has started talks to open an assembly plant for Lada cars in Iran.

The oil and natural gas giants Gazprom and Lukoil are weighing investments in a liquefied natural gas project on the Persian Gulf, and an oil field. The Eurasia Drilling Company, an oil field services business, and Tatneft, a second-tier Russian oil company based in Tatarstan, a predominantly Muslim region east of Moscow, both have good prospects.

“If you have dry firewood and the wind is blowing, the fire will get going,” Sergei G. Chetverikov, director of the pipe factory here, said of TMK’s prospects in Iran. “All you need is the match.”

After the signing of the nuclear deal with Iran, the Obama administration promoted the benefits for nonproliferation and global security. But the administration was less vocal about the benefits for business.

That is because the United States is cautiously eyeing Iran.

Under the deal, authorities in Tehran agreed to open their nuclear program to stepped-up inspections and to ship enriched uranium to Russia, in exchange for the lifting of international sanctions. But the United States still has sanctions on Iran for supporting terrorism and human rights abuses.

Those sanctions prohibit most commercial ties with Iran, so American companies are not permitted to vie for contracts with its oil and natural gas industry. The United States is allowing trade only in Persian rugs and commercial airplanes.

European companies are better positioned, as much of the region tries to develop diplomatic ties with Iran.

With ink still drying on the nuclear deal last July, Germany’s vice chancellor, Sigmar Gabriel, escorted to Tehran a delegation of executives from his country’s largest companies, including Daimler, Volkswagen and Siemens. Airbus, the aerospace manufacturer, is starting negotiations with Iran. Last month, Hellenic Petroleum, a Greek oil refiner, struck the first deal to buy Iranian crude oil after sanctions were removed.

Russia has an advantage. It has long backed Iran diplomatically and it has deep military ties.

After the nuclear deal, Vice Prime Minister Dmitry Rogozin of Russia said his country was beginning to supply S-300 antiaircraft missile systems to Iran. “This contract is now executed and paid for,” Mr. Rogozin said.

He noted that the deals between Russia and Iran were not just in the military arena. The S-300 supply, he added, would “open the entire road for cooperation with Islamic Republic of Iran.”

Like other countries, Russia sees opportunity in a country long starved for capital.

Iran’s economy is expecting a jump-start from $29 billion in frozen offshore assets, unfrozen as a condition of the deal. The International Monetary Fund projects that Iran’s economy will grow 5.5 percent in 2016 and in 2017.

The energy industry is especially attractive for overseas companies.

Iran holds the Middle East’s second-largest oil deposits, after Saudi Arabia, and by some estimates the world’s largest reserves of conventional natural gas. Even before sanctions were lifted, Iran signed deals to export gas to Iraq and Pakistan.

But its industry lacks the pipes to deliver that gas, as companies woefully underinvested during the era of sanctions. In total, Iran could spend as much as $100 billion rebuilding its natural gas pipelines, analysts said.

TMK says it is in a good position to provide much of that business.

At its gigantic metal works here, it pours, grinds and welds the huge steel straws that pull much of the world’s oil out of the depths. The company says 20 percent of the global oil brought to the surface at one point or another flows through a TMK tube, including high-end varieties of pipe made for the insides of oil wells.

“We make the pipe Bentleys,” Vladimir Shmatovich, vice president for strategy, said in an interview.

Russia does face some challenges as it prepares to jump into Iran.

With its own set of Western sanctions over the Ukrainian conflict and weak oil prices, the Russian economy is suffering, and companies are having a tough time raising money. That could make it difficult for companies like Lukoil and Gazprom, their revenues shrinking, to immediately revive their production deals in Iran.

“The general feeling is still cautious,” said Ildar Davletshin, an oil and gas analyst at Renaissance Capital, a Moscow investment bank. With low oil prices, the budgets of Russian oil companies are “under huge stress.”

TMK views Iran as an antidote to the industry woes.

After the United Nations imposed sanctions on Iran in 2006, Russian companies like TMK had to retreat. TMK’s bottom line suffered.

So TMK shifted gears, moving to the United States. As the shale boom took off, the company bought 12 factories in North America.

Now, the pendulum is swinging the other way. With energy prices falling, shale companies are suffering. TMK’s North American division, Ipsco, has idled two plants and plans to lay off 40 percent of its 2,700-person work force.

At home in Russia, TMK is hunkering down.

It has put in place incentives for workers who find ways to cut costs on the factory floor, such as vacations in Sochi, the Black Sea resort. TMK is also nudging its Russian workers to adopt the timesaving ways of the Toyota production system, a Japanese industrial philosophy.

More important, TMK wants to increase production.

And it is looking to the past for how important Iran could be. In the Soviet period, the plant here provided up to 40 percent of the pipes used in Iran’s oil industry – including casing set into oil wells and pipes carrying natural gas over the desert.

“The idea is simple: They lift the sanctions, we send the pipes,” said Mr. Chetverikov, the TMK plant director here.