Known widely for its porcelain, this grimy city in southern China is the source of much of the world's tiles and bathroom fixtures. Yet several factories have shut down in recent weeks, and nearly all are running at a reduced clip: Here in Guangdong province, the heart of China's industrial boom, many manufacturers cannot find enough gasoline and heavy oil to keep their operations going.

Trucks that haul wares to other cities must stop frequently to look for the next tank of diesel, as roughly one-fourth of the service stations in Guangdong are closed for lack of gas. The others are rationing fuel to cope with lines snaking into the street. Taxi drivers queue at midnight, just before tanker trucks come to replenish the stock.

In addition to high energy prices and idled oil production in the Gulf of Mexico due to hurricanes, China is grappling with oil shortages of its own making -- a function of its peculiar status as an economy caught between its Communist past and the modern forces of capitalism. Demand for gasoline and diesel in China is propelled by the market, as factories expand and cars proliferate, yet the state controls retail prices to limit inflation. This has encouraged China's oil companies and refineries to export all they can to take advantage of higher prices elsewhere, even as the country remains a net oil importer, relying on foreign stocks for about one-third of its consumption.

In the first seven months of the year, China's exports of refined oil products such as gasoline leapt by more than 45 percent, according to state statistics, with many shipments bound for Hong Kong and Vietnam. Crude oil exports jumped by nearly 30 percent, even as Chinese companies search the globe for new sources as part of a state-mandated energy-security initiative.

"Our national companies want to export to make dollars, so we don't have any oil," said Huang Caixin, a sales representative at Zhipeng Ceramics Co., which makes bathroom and kitchen tiles at three factories here that collectively employ some 2,400 people. "We're cutting production, and our profits are down. Almost every factory here is running at less-than-full capacity."

Seeking to plug the gap, the central government on Sept. 1 announced that oil companies and refineries could not sign new export contracts. But the ban does not affect contracts already in force, nor is it likely to choke an illicit trade from Guangdong -- whose shores have long nurtured smuggling -- with buyers in Taiwan and South Korea, where gas prices are as much as one-third higher.

The export strictures are of greatest concern to two of China's largest state-owned energy firms, China National Petroleum Corp. and China Petroleum and Chemical Corp. -- better known as Sinopec -- whose refineries control 90 percent of the domestic market for gasoline and diesel. They must import most of the crude oil they refine, paying world market prices, then sell the gasoline and diesel they produce at a loss inside China. Like many state-owned companies, they answer to two conflicting masters: Their stocks trade on exchanges in New York and Hong Kong, where shareholders demand profit, yet they remain under the control of China's Communist Party government, which requires that they satisfy demands for cheap fuel at home.

"There is not much direct administrative control over state oil giants like CNPC or Sinopec to, say, sell only sell to the domestic market," said Dong Xiucheng, an economist at China University of Petroleum in Beijing. "But they are state-owned companies with their leaders officially appointed by the state. At some point, they must take political needs into consideration."

Rising oil prices in recent months have exacerbated the gap between what refiners must pay for oil on world markets and what they can charge for gasoline and diesel at home. Since 2003, China has lifted retail gas prices seven times, for a cumulative increase of 34 percent, according to Dong Tao, China economist at Credit Suisse First Boston in Hong Kong. But over the same period, world oil prices have risen 84 percent.

In the first half of the year, China's refineries produced more than 26 million tons of gasoline, according to state statistics. Refineries have responded to recent pressure from local governments by increasing supplies, considerably easing the shortages. Yet for each ton of gas that the two state-owned giants refine and sell inside China, they lose up to $125, according to Dong Tao. In other words, China's central government is forcing losses on its state-owned refineries to subsidize domestic gasoline.

Letting the market set the price of gas would increase inflation in China by roughly 2 percent, said Andy Xie, an economist at Morgan Stanley in Hong Kong. Rising inflation could spawn unrest among the country's hundreds of millions of rural poor.

"Government officials are still learning to trust the market mechanism," Xie said. "They are containing inflation, but you're building up more and more distortions in the economy."

In a recent editorial, Caijing, an influential Beijing-based financial magazine, warned that continued state control over energy prices discourages industry from improving efficiency.

"The distorted prices suppress supply and stoke demand," Caijing said. "Should they continue unchecked, they will not only cause periodic oil shortages to worsen, but also send the wrong price signals to the economy as a whole: the trend of energy-wasting, inefficient projects will persist."

But even as refiners must forego foreign profits, they have benefited in one key regard: They have gained a firm grip on the retail gasoline market, putting them in position to eventually profit on price increases. Sinopec and CNPC are restricting their shipments of gasoline to stations they own while starving independent operators.

On a recent afternoon in Foshan, the pumps sat idle at the Agriculture Machinery Gas Station. "We haven't been able to get a shipment since August 24th," said a manager, who spoke on condition of anonymity for fear she would anger the local government. "They say they have no gasoline for us. It's because we're private."

Nearby, a station owned by Sinopec had all six pumps in operation as attendants oversaw a brisk business.

The uncertainties have wreaked havoc on factories here already accustomed to electrical rationing.

In the porcelain district, the Shengluolan Ceramics Factory, once a workplace for nearly 500 people, sat empty and idled. A bulldozer in the driveway barred entry as three uniformed security guards sat on folding chairs in the summer heat. They were there to fend off angry creditors and laid-off workers seeking wages from the bankrupt company. All in vain.

"Everyone's gone," one guard said. "The boss ran away."

Special correspondent Eva Woo contributed to this report.

China is facing severe problems of fuel shortage, resulting in oil rationing in parts of the country.