The West had also promoted free and democratic elections in Gaza, Mr. Putin added. “That’s great, but Hamas won, and that was declared terrorism,” he said, though he played down the risk of a surge of radical Islam in the Caucasus.

Photo

European officials said that behind Mr. Putin’s criticism of foreign policy lay a reminder that turmoil in the Middle East and North Africa could decrease Europe’s range of energy sources and make it more dependent on Russian energy. The European Union’s stated objective is to diversify its suppliers — an aim that has been complicated by the recent upheaval.

Russia is one of the bloc’s closest trading partners — and its most important energy supplier — and Europe is the largest market for Russian exports, according to the European Commission. But energy policy has become a delicate issue after disputes between Russia and Ukraine, which led to a disruption of supplies in recent years.

Clear differences emerged between Mr. Putin and Mr. Barroso over European Union rules, to be enacted in March, that place limits on the ownership of pipeline infrastructure by gas suppliers. Because of the changes, Russia could be forced to sell off some of its pipeline network in some European countries, like Lithuania.

Newsletter Sign Up Continue reading the main story Please verify you're not a robot by clicking the box. Invalid email address. Please re-enter. You must select a newsletter to subscribe to. Sign Up You will receive emails containing news content , updates and promotions from The New York Times. You may opt-out at any time. You agree to receive occasional updates and special offers for The New York Times's products and services. Thank you for subscribing. An error has occurred. Please try again later. View all New York Times newsletters.

The rules “will harm the activities of our energy companies,” Mr. Putin said, contending that prices for consumers would rise. “We are talking in practice about the confiscation of property.”

In a series of exchanges, Mr. Barroso rejected the idea that the move was discriminatory, arguing that companies in the European Union, and those from nations outside the bloc, like Norway, would have to obey similar rules.

Mr. Putin struck a softer tone over oil prices, which have increased because of the uncertainty in the Middle East. “We are not interested in excessive growth of oil prices,” he said, adding that “our economy is more diversified now.”

Russian officials contend that efforts to create a more broadly based economy will be hampered if the prices of oil and gas surge, increasing costs for other Russian industries and hurting the growth rate in other countries.

After Thursday’s talks, the bloc’s foreign policy chief, Catherine Ashton, and the Russian foreign minister, Sergey V. Lavrov, issued a joint statement condemning “the violence and the use of force against civilians in Libya.”