She hated being herded “like cattle,” she said, standing for hours in a line of more than 1,500 people hoping to buy food, as soldiers with side arms checked identification cards to make sure no one tried to buy basic items more than once or twice a week.

But Ms. Noriega, a laboratory assistant with three children, said she had no choice, ticking off the inventory in her depleted refrigerator: coffee and corn flour. Things had gotten so bad, she said, that she had begun bartering with neighbors to put food on the table.

“We always knew that this year would start badly, but I think this is super bad,” Ms. Noriega said.

Venezuelans have put up with shortages and long lines for years. But as the price of oil, the country’s main export, has plunged, the situation has grown so dire that the government has sent troops to patrol huge lines snaking for blocks. Some states have barred people from waiting outside stores overnight, and government officials are posted near entrances, ready to arrest shoppers who cheat the rationing system.

Because Venezuela is so dependent on oil sales to buy imports of food, medicine and many other basics, the drop in oil prices means that there is even less hard currency to buy what the country needs.

Even before oil prices tumbled, Venezuela was in the throes of a deep recession, with one of the world’s highest inflation rates and chronic shortages of basic items.

One of the nation’s most prestigious public hospitals shut down its heart surgery unit for weeks because of shortages of medical supplies. Some drugs have been out of stock for months, and at least one clinic performed heart operations only by smuggling in a vital drug from the United States. Diapers are so coveted that some shoppers carry the birth certificates of their children in case stores demand them.

Now economists predict that shortages will get even more acute and inflation, already 64 percent, will climb further. The price of Venezuelan oil dropped this month to $38 a barrel, down from $96 in September.

“Things are going to be even worse because oil keeps Venezuela going,” said Luis Castro, 42, a nurse, standing in line with hundreds of others at a grocery store. He had arrived with his wife and 6-year-old son at 6 a.m., but by 11:30 a.m., they had still not entered. “We’re getting used to standing on line,” he said, “and when you get used to something, they give you only crumbs.”

The shortages and inflation present another round of political challenges for President Nicolás Maduro, who has vowed to continue the Socialist-inspired revolution begun by his predecessor, the charismatic leftist Hugo Chávez.

“I’ve always been a Chavista,” said Ms. Noriega, using a term for a loyal Chávez supporter. But “the other day, I found a Chávez T-shirt I’d kept, and I threw it on the ground and stamped on it, and then I used it to clean the floor. I was so angry. I don’t know if this is his fault or not, but he died and left us here, and things have been going from bad to worse.”

Venezuela has the world’s largest estimated petroleum reserves, and when oil prices were high, oil exports made up more than 95 percent of its hard currency income. Mr. Chávez used the oil riches to fund social spending, like increased pensions and subsidized grocery stores. Now that income has been slashed.

“If things are so bad now, I really cannot imagine how they will be in February or March” when some of the lowest oil prices “materialize in terms of cash flow,” said Francisco J. Monaldi, a professor of energy policy at the Harvard Kennedy School of Government.

Mr. Maduro spent 14 straight days in January traveling the globe in an effort to court investment and persuade other oil-producing nations to cut production and push the price back up.

Image

Thousands waited last week to buy basic goods at subsidized prices in Caracas. Those who cheat on rationing risk arrest. CreditMeridith Kohut for The New York Times

“We have serious economic difficulties regarding the country’s revenue,” Mr. Maduro said to the legislature during his annual address, which had to be pushed back because of the trip. “But God will always be with us. God will provide. And we will get, and we have gotten, the resources to maintain the country’s rhythm.”

After months of toying with the politically taboo idea of raising the price of gasoline sold at pumps here, the cheapest in the world, he said that the time had finally come to do so.

And he reiterated his position that the country’s economic ills are the fault of an economic war being waged against his government by right-wing enemies.

Some investors fear Venezuela will default on billions of dollars in bonds, but Mr. Maduro has said the country will pay its debts.

Typically, in an election year like this one, when voters will choose a new legislature, the government showers supporters with goods, like refrigerators and washing machines, or other benefits, like free housing. But now there may not be enough foreign currency to import appliances and construction materials.

In interviews, shoppers did not say they were going hungry. Rather, many said the economic crisis meant eating canned sardines instead of chicken, or boiled food instead of fried because vegetable oil is so hard to get. Many said they ate meat less frequently because it is out of stock or too expensive. Fresh fish can be harder to find, in part, fishermen said, because they find it more profitable to use their boats to sell subsidized Venezuelan diesel on the black market in a high-seas rendezvous instead of hauling in a catch.

Video

As the price of crude oil fluctuates, why some countries are faring much better than others.Published OnJan. 27, 2015CreditCreditCarlos Garcia Rawlins/Reuters

But social media in Venezuela is full of urgent pleas from patients trying to find prescription medicine.

Dr. Gastón Silva, the head of cardiovascular surgery at the University Hospital of Caracas, said that because of medical shortages, only about 100 heart operations were performed there last year, down from 300 or more in previous years.

Some patients who had been hospitalized awaiting surgery for a month or more were sent home in November because there were not enough supplies, and the operating rooms remained shut for more than eight weeks, Dr. Silva said, despite a list of hundreds of people awaiting heart operations.

He said the shortages stemmed from the government’s foreign exchange controls, which have kept medical importers from getting access to the money they need to make purchases abroad. Now with the low price of oil further restricting the government’s supply of hard currency, he worried the crisis would get worse.

“We are getting to a breaking point,” Dr. Silva said. “If one thing is lacking, O.K. If there are no automobile parts, we’ll see. Food, that’s problematic. But health care, that’s more problematic. Where will it end?”

Mr. Silva said that a private clinic where he also works had sharply scaled back heart surgeries in the last four months of 2014 because of limited supplies.

A heart surgeon at another private clinic said that a colleague had smuggled an essential drug from the United States to keep the operating room functioning.

Ana Guanipa, 75, a retired government office worker, said that she had searched numerous pharmacies for her hypertension medicine.

“I’ve been looking all month, and I can’t find it,” she said, adding that a neighbor who takes the same drug gave her some. “I take it one day on and one day off so that it will last longer.”

On a recent morning, hundreds of people stood in line outside a big-box store, similar to Costco. Inside, many shelves were stripped clean. The large appliance and electronics section was empty. One aisle displayed hundreds of boxes of a single brand of toothpaste. There was no fresh meat; a cooler was filled with frozen pigs feet.

Most people came to buy only three items sold at government-mandated prices: laundry detergent, vegetable oil and corn flour.

Every purchase was entered into a database, ensuring that shoppers did not try to buy the same regulated staples at the chain for at least seven days.

Soldiers patrolled the line outside, police officers were stationed inside and government officials checked identification cards, looking for fake ones that could be used to cheat the rationing system — or for immigrants with expired visas. An official from the immigration and identification service said that offenders would be arrested.

“This is pathetic,” said Yenerly Niño, 18, adding that she had waited more than five hours to buy the three subsidized products because she could not afford to buy them at the higher prices charged by street vendors.

“You do what you have to,” she said. “If you don’t do it, you don’t eat.”

Catalina Lobo-Guerrero and Patricia Torres contributed reporting.

A version of this article appears in print on , on Page A1 of the New York edition with the headline: Oil Cash Waning, Venezuelan Shelves Lie Bare. Order Reprints | Today’s Paper | Subscribe