A vendor sells vegetables and fruits at the city market. (Alexander Demianchuk/Reuters)

Russia on Thursday banned most imports of Western food products, a sweeping escalation in an economic war that will deal a multibillion-dollar hit to affected nations but will also unreel wide-ranging consequences at home.

The measures were a signal that Russia is not backing down from a confrontation that has sent Western-Russian tensions to heights not seen since the Cold War — and that it is willing to risk barer shelves and higher food prices at home in the name of striking a blow against countries that have tried to punish it over its role in the Ukraine conflict.

Russia has suspended imports of meat, fish, fruit, vegetables and milk products from the United States, the 28-nation European Union, Norway, Canada and Australia for a year. The move came in retaliation for sanctions those countries imposed on Russia, which is accused of providing weaponry and other support to pro-Russian rebels in eastern Ukraine. Russia has denied the allegations.

Western officials this week also accused Moscow of massing troops along the Ukraine-Russia border in a formation that appears designed for an invasion.

In another move with Cold War echoes, Prime Minister Dmitry Medvedev also said Thursday that Russia was considering banning U.S. and European airlines from flying over Russian airspace in transit to Asia. That could increase travel times and costs and would be a step back to an era when Western planes were enjoined from flying over the Soviet Union.

“We hoped until the very last moment that our foreign partners would realize that the path of sanctions is a dead-end and that nobody needs them,” Medvedev said. “They failed to realize it.”

In Russia, the food measures promised to hit not just city centers, where the urban middle class has grown accustomed to visiting supermarkets overflowing with high-quality imported European cheeses, fish and sausages. Analysts warned that food prices also would increase and that a wide range of Russian industries, including food processing plants, shippers and retailers, would be affected.

Even zoo animals may take a blow — the spokeswoman of the Moscow Zoo said Thursday that most of the animals’ food was imported and that certain products would not be easy to replace.

The measures, which are effective immediately, were a harsh response to the E.U. and U.S. sanctions imposed last week that will cut financing for major Russian banks, restrict technology exports for the oil industry and end much defense-sector purchasing. Earlier sanctions, imposed after Russia annexed the once-Ukrainian Crimean Peninsula in March, froze the assets of many top Russian officials in the West and banned them from travel there.

“If our partners demonstrate a constructive approach toward cooperation issues, the government will be ready to reconsider the time frame of these measures,” Medvedev said.

A top Treasury Department official said Thursday that the agriculture bans would not hurt the United States.

The Russian bans are “insignificant as an impact on the U.S. economy,” the Treasury official in charge of the U.S. sanctions program, David Cohen, said in a conference call with reporters Thursday. He said it was U.S. policy not to impose sanctions on food or medical sectors.

European countries were more exposed, and individual sectors in certain nations looked particularly vulnerable. Dairy producers in Finland, an E.U. member, said they were taking portions of their production offline until the situation was resolved. The Norwegian fishing industry also was going to be hit hard, analysts said. Those industries may pressure their governments to dial back their sanctions more quickly or to hesitate on undertaking further measures.

The targeted countries supply about 10 percent of Russia’s pork, fish and fruit, Russian Agriculture Minister Nikolai Fyodorov said Thursday. Other areas are less hard-hit, he said, adding that the government did not expect any food shortages because of the new policies.

State television channels on Thursday repeatedly broadcast images of Russian farmers reaping bountiful harvests of potatoes and wheat and of Russian markets overflowing with domestic products. Russian officials also said they were discussing upping the import of meat from Argentina, dairy products from Turkey and other items from around the world.

Russian imports of U.S. food and agricultural products totaled $1.3 billion in 2013, according to the U.S. Agriculture Department. For the E.U., the figure was $15.8 billion in 2013.

The bans will not return Russian grocery stores to Soviet-era inventory levels, but they did appear to deal a major blow to 23 years of gains and Westernization in the consumer market since the breakup of the Soviet Union. Russia is highly dependent on imports for much of its food, and analysts said the restrictions are likely to drive up food prices in the country.

“It will be quite sensitive,” said Yevsey Gurvich, the head of the Economic Expert Group. “Not only rich people will feel it, but literally every family will be affected.” He said he estimated that Russian consumer prices would go up 2 percent this year because of the measures.

“Alternatives to imported foods will be more costly, and, anyway, I believe they will be insufficient, and our supplies will diminish. And, hence, prices will go up,” he said.

Russian agricultural businesses have struggled to modernize their production and distribution networks after the fall of the Soviet Union, leaving them struggling to shoulder the burden of feeding an entire nation. Many foreign products also are used in the creation of domestic foods.

“We’re still working to understand the scope of the tragedy,” said Aleksey Aronov, the executive director of the Russian Association of Fish Processing and Trading Companies. “I’ve been receiving calls every minute, especially from factories who work in the northwest of Russia,” to process Norwegian salmon and other fish products, he said. “Many of these factories are in small towns where there is just one factory. They work only on Norwegian materials. So, of course, there will be unemployment, because they don’t know what to do now.”

But a spokesman from a major Russian retailer said customers would adapt.

“This is not the first time we are living through a campaign restricting certain food products,” said Vladimir Rusanov, the director of public relations at the X5 Retail Group, a major Russian grocery chain. “Our customers are very flexible. They can adapt easily to new conditions. If they don’t see one thing, they’ll see something else.”

Shopgoers in Moscow were calm about the measures.

“Well done, Putin,” said Valentina Antonyuk, 74, who was shopping Thursday at an upscale grocery across the street from the Foreign Ministry. Shelves at the store were laden with chocolate from Belgium and cheese from France and the Netherlands. Fruits and vegetables from Western Europe stretched over tables.

“It’s a revenge,” she said. “What else can he do? That’s the way to get them.”