BUDAPEST (Reuters) - Hungarian state-owned energy conglomerate MVM will buy a 5% stake in Azerbaijan's Shah Deniz gas field, it said in a statement on Wednesday.

Hungary, a landlocked country, has been importing natural gas mainly from Russia even after its invasion of Ukraine in 2022, which led many European countries to seek alternative sources of energy supplies.

Acquiring a stake in this gas field "gives us (Hungary) a protection from big energy price swings," Hungarian Foreign Minister Peter Szijjarto said earlier in the day in Baku during a joint press conference with his Azeri counterpart, announcing the acquisition.

"As Azerbaijan is a new player in our energy supply, this situation gives us a much more stable energy supply, much more security of energy supply."

The Shah Deniz field is one of the world's largest natural gas fields, with an annual production of 29 billion cubic metres (bcm), the MVM statement said.

The stake's size would translate into an annual supply of 1.5 billion cubic metres (bcm) of natural gas for Hungary.

Hungary has been receiving 4.5 bcm of gas per year from Russia under a 15-year deal signed in 2021.

The Hungarian government's spokesperson said on social media platform X after the announcement that the gas field stake "secures a significant portion of Hungary's gas needs".

Hungary is also buying 50 million cubic metres of natural gas this year from Azerbaijan for the first time, Szijjarto added.

(Reporting by Boldizsar Gyori; editing by Jason Neely and Tomasz Janowski)