Rodrigo Abd, Associated Press
People queue up to buy food at a state-run outdoor market in Caracas Sunday. Foods covered by price controls such as eggs, milk and sugar are hard to find.

CARACAS, Venezuela — The lines formed at dawn and remained long throughout the day — hundreds upon hundreds of Venezuelans waiting to buy scarce milk, chicken and sugar at state-run outdoor markets staffed by soldiers in fatigues.

President Hugo Chavez's government is trying to cope with shortages of some foods, and the lines at state-run "Megamercal" street markets show many Venezuelans are willing to wait for hours to snap up a handful of products they seldom find in supermarkets.

"You have to get in line and you have to be lucky," said Maria Fernandez, a 64-year-old housewife who was trying to buy milk and chicken on Sunday.

The lines for basic foods at subsidized prices are paradoxical for an oil-rich nation that in many ways is a land of plenty. Shopping malls are bustling, new car sales are booming and privately owned supermarkets are stocked with American potato chips and French wines.

Yet other foods covered by price controls — eggs, chicken — periodically are hard to find in supermarkets. Fresh milk has become a luxury, and even baby formula is scarce.

The shortages are prompting some Venezuelans to question Chavez's economic policies while he campaigns for constitutional changes that, if approved in a Dec. 2 referendum, would let him run for re-election indefinitely.

Some government officials accuse producers of keeping basic goods off the market to profiteer or to sow discontent among the poor, Chavez's core supporters.

Economists say the factors behind the shortages are numerous, including surging demand due to economic growth.

The government's price controls are also "totally divorced" from reality — in some cases below production costs — making it unprofitable for suppliers to sell their products at official prices, said economist Pedro Palma of the Caracas consulting firm MetroEconomica.

More investment is needed in agriculture, but the government's agrarian reform effort — assuming control of vast farmlands and offering them to poor farmers — has made traditional producers reluctant to invest, he said.

Importers also face hurdles. Currency exchange controls imposed in 2003 require state approval to obtain dollars at the official rate. Those without it turn to the black market, buying dollars for about three times the fixed rate.

To compound the problem, Palma said, some of the products Venezuela looks to import, such as milk and sugar, are scarce internationally.

Many Venezuelans in line at the Megamercal said they were grateful to Chavez for subsidized markets offering prices far cheaper than commercial supermarkets. But they also complained of struggling to find milk, chicken, sugar and cooking oil elsewhere at prices set by the government.

"I arrived at 6 in the morning to get in line," said Doris Bastida, 32, a mother of four who wheeled an infant son in a stroller. She had been waiting for about four hours when she reached the entrance.

"What am I going to do? I don't have anywhere else to go," she said. Powdered milk is sold by black market street vendors at $4.50 or more for a 16-ounce container — about twice the regulated price and four times the price offered by the state markets.

Bastida said she still believes in Chavez and plans to vote in favor of his reforms "so that things will get better." Plus, she said, if "everyone votes 'No,' they're going to take the Megamercal away from us."

Others, speaking in hushed tones, said they see Chavez's government as a failure and do not want him to run again in 2012.

"We have to vote 'No,"' said 50-year-old Fatima Rodriguez. "Do you think it's good to be here waiting in line?"

Chavez says he is aiming to boost agriculture with projects including state-supported sugar harvesting and a milk processing plant started with help from Iran. For now, Venezuela imports most of its food, and imports overall have more than doubled in the past three years.

Chavez's food minister, Gen. Rafael Oropeza, said the open-air markets were fully stocked across the country over the weekend, with a record 6,557 tons of food delivered for sale nationwide on Sunday. He said leg of pork was imported because local suppliers declined to participate.

"I'm putting out a call to businesses for them to raise production and respond to the demand," Oropeza said, according to the newspaper El Nacional. He suggested there were political motives behind the shortages.

"That's the objective, that the people reach the point of desperation," Oropeza said.

The Venezuelan Food Industry Chamber denied its members are to blame, saying they are working to satisfy rapidly growing consumer demand.

At one state market in Caracas, the line snaked around a block Sunday, while soldiers manned barricades at the entrance. A banner read, "Continue on with Chavez." Red campaign signs plastered on walls urged: "Yes, with Chavez."

Factory worker Eugenio Ruiz praised Chavez for the subsidized food and said he plans to vote "Yes."

"Look at all he's done for us," Ruiz said, explaining he thinks the situation would be worse without Chavez. "We have to stay with him, not abandon him."