On Saturday, both countries agreed to increase trade to $600 billion in the coming decade.

That agreement was made during a meeting between Iran’s leaders and China’s president, Xi Jinping, who late last week became the first foreign leader to visit Iran after most international sanctions were lifted. China has relied on Iranian oil and views the country as a vital link in Mr. Xi’s so-called Silk Road strategy, an ambitious agenda that seeks to extend China’s economic influence westward.

“Where we had to stand on the sidelines, the Chinese have been filling the void,” said a European diplomat who spoke on the condition of anonymity to discuss strategic considerations. “They are way ahead of all of us.”

The deep Chinese footprint in Iran does not manifest itself only in the tens of thousands of inexpensive cars that have flooded the streets of Tehran in the past few years. Investors like Mr. Li, who has built two other factories here, as well as Chinese state companies, are active all over the country, building highways, digging mines and melting steel.

In Tehran, the Chinese have been involved in the construction of a huge elevated expressway and the building of the Niayesh Tunnel, which at more than three and a half miles will be one of the longest urban tunnels in the world. The city’s metro system was built from scratch, starting in 1995, with Chinese capital and Chinese engineers. The train cars that run on it are Chinese, too.

“Westerners visiting the capital often wonder how we managed to pull off such ambitious projects during the heaviest sanction regime in history,” said Mohammad Reza Sabzalipour, Iran’s World Trade Center representative. “Well, we did it with the help of our Chinese friends.”