BUCHAREST, Romania (AP) — The leaders of Hungary, Romania, Georgia and Azerbaijan finalized an agreement Saturday on an undersea electricity connector that could become a new power source for the European Union amid a crunch on energy supplies caused by the war in Ukraine. The agreement involves a cable running beneath the Black Sea that would link Azerbaijan to Hungary via Georgia and Romania. The deal comes as Hungary, which has lobbied heavily against EU sanctions on Russia for its war in Ukraine, is seeking additional sources for fossil fuels to reduce its heavy dependence on Russian oil and gas. Azerbaijan plans to export electricity from offshore wind farms to Europe via Georgia, a cable beneath the Black Sea, and then to Romania and Hungary. The office of Romanian President Klaus Iohannis said in a statement Friday that the agreement between the four nations will provide the “financial and technical framework” for the undersea electricity cable project. The project will aim to divers ify energy supplies and increase regional energy security, the statement said. On Friday, Romanian natural gas producer Romgaz also said it signed a contract with Azerbaijan’s state oil company SOCAR to receive natural gas through the so-called southern gas corridor, with deliveries set to start on Jan. 1. Romgaz said it will serve its “strategic objectives” of diversifying natural gas sources.Hungary’s foreign minister, Peter Szijjarto, said in August that Azerbaijan would soon produce “large quantities of green electricity” with offshore wind farms, and that by signing on to the connector project which could bring that energy to Europe, Hungary was fulfilling a requirement that two EU member nations participate in order for the investment to receive funding from the bloc. Szijjarto said the project could be completed within three or four years, and that it would be a major step toward diversifying energy supplies and meeting carbon neutrality targets. Story continuesThis week, Szijjarto met with officials from both Qatar and Oman on the potential future import of oil and natural gas to Hungary from the two Middle Eastern countries, a further sign that Hungary is taking steps to level down the 85% of its natural gas and more than 60% of its oil that it currently receives from Russia.Hu Nigerian Prime Minister Viktor Orban, Romanian President Iohannis, Georgian Prime Minister Irakli Garibashvili and Azerbaijani President Ilham Aliyev attended the signing event in Bucharest Saturday alongside European Commission President Ursula von der Leyen___Spike reported from Budapest. Stephen McGrath in Bucharest contributed.