BERLIN — Lithuania has stopped importing natural gas from Russia as of April and will be able to rely instead on deliveries from other countries to meet its energy needs, the country’s president announced on Saturday, saying the move was an example for other European Union members.Before Russia’s invasion of Ukraine, the E.U. had been looking for ways to reduce its dependency on Russian fossil fuels, including coal and oil, but especially gas. Nearly 40 percent of the bloc’s total natural gas came from Russia. But since Moscow ordered tanks into Ukraine on Feb. 24, member states have been more actively seeking ways to cut their gas needs.“If we can do it, the rest of Europe can do it too,” Gitanas Nauseda, Lithuania’s president, said on Twitter on Saturday.While Lithuania is a tiny country with only 2.8 million people and an economy more reliant on trade than industry, it is the largest economy in the Baltic States and also a member of the eurozone. So while losing Lithuania as a customer is unlikely to significantly hurt Gazprom, Russia’s state-owned energy group, the move has geopolitical significance in setting a precedent for the E.U.“I think it is a symbolic step by Lithuania, which has long tried to be in the vanguard of reducing and potentially eliminating its dependence on Russian gas,” said Katja Yafimava, a senior research fellow at the Oxford Institute for Energy Studies. She added that Germany, France and Italy could not easily make a similar move because they rely on much higher volumes of Russian gas and are bound to long-term contracts.Lithuania borders on the Russian territory of Kaliningrad and was once fully dependent on imports of Russian gas — a legacy of the country’s history as part of the former Soviet Union. But construction of a liquefied natural gas terminal in 2014 allowed it to begin moving away from dependence on Russia.Last week, President Vladimir V. Putin threatened to cut off gas supplies to “unfriendly countries,” unless the countries started paying for the supplies in rubles. European leaders rejected the idea, but it remained unclear how the standoff might be resolved. Germany and Italy, especially, are heavily dependent on Russian gas, although Germany has recently secured partnerships with the United States and other energy-rich countries.President Volodymyr Zelensky of Ukraine has called on E.U. countries to stop buying gas from Russia, going so far as to urge Qatar and other energy producers to increase their gas exports to Europe as part of a drive to reduce the continent’s reliance on Russian fossil fuels.Earlier this year, Lithuania’s energy minister said the country was able to order enough deliveries of LNG to meet its energy needs. If necessary, it can also receive gas deliveries via a link with Latvia.“We are the first E.U. country among Gazprom’s supply countries to gain independence from Russian gas supplies, and this is the result of a multiyear coherent energy policy and timely infrastructure decisions,” Dainius Kreivys, the country’s energy minister, said in a statement on Saturday.