BEIJING — Prime Minister Wen Jiabao wrapped up a six-day Middle East tour this week with stronger-than-usual criticism of Iran’s defiance on its nuclear program, and with multibillion-dollar oil deals that would seem to signal less reliance on Tehran for China’s growing energy needs.

Mr. Wen’s criticism of Iran was well received by his Persian Gulf hosts, who urgently want to contain Iran’s regional power and nuclear program. As the United States raises pressure on China and other Asian oil importers to curtail purchases from Iran, Saudi Arabia — China’s No. 1 supplier — and some other gulf states have offered to expand production to make up for any gaps.

But throughout his visit, Mr. Wen repeated that China’s business deals with Iran — its No. 3 supplier — were separate from diplomatic questions and that sanctions threatened global trade more than any individual nation. Analysts said the deals, arranged long before the visit, were not aimed at reducing Chinese reliance on Iranian oil but at broadening China’s oil supplies.

The arrangements included a plan by China’s Sinopec Group to build a $10 billion, 400,000-barrel-a-day refinery on the Saudis’ Red Sea coast. While Mr. Wen was in Qatar, the China National Petroleum Corporation unveiled plans to build a refinery at Taizhou, on China’s Pacific coast, in a venture with Qatar Petroleum International and Royal Dutch Shell.