BRATISLAVA (Reuters) - Slovakia has agreed a $1.9 billion deal to buy 14 U.S.-made F-16 fighter jets to replace its ageing Russian-made MiG-29s, its defense ministry said on Wednesday.

FILE PHOTO: A Lockheed Martin F-16 Fighting Falcon flies on the second day of the Farnborough International Airshow in south England July 15, 2008. REUTERS/Toby Melville/File Photo

Slovakia picked the new F-16s made by Lockheed Martin over Swedish Gripen jets produced by Saab, calling them more modern and more advanced, according to an analysis published before the decision.

“We picked the best solution because they are modern machines, which from a price, quality and capability point of view that we can afford, have no competition,” Defence Minister Peter Gajdos said in a statement.

NATO member Slovakia plans to spend about 6.5 billion euros ($7.6 billion) by 2030 to modernize its military, and wants to reduce its reliance on Russian equipment, but has a maintenance contract with Russia for its 12 MiG-29s until autumn 2019.

Under the contract, which is worth 20 million to 50 million euros a year, dozens of Russian technicians are based at a Slovak military airbase. That arrangement may have to be extended as delivery of the first F-16s will take up to 36 months from the signing of the contract.

Slovakia may also ask one of its neighboring countries, which are also its NATO allies, to help protect its airspace, Prime Minister Peter Pellegrini said.

“Slovakia will pay 1.589 billion euros for 14 fighter jets, pilot training, ammunition and two-year logistical support,” Pellegrini told reporters.

The contract with Lockheed Martin will be signed by the end of this year, Finance Minister Peter Kazimir said.

Slovakia had been in talks with Gripen maker Saab for years, before Gajdos stalled discussions and invited other bidders.

That sparked criticism from government coalition partners that delays in closing the deal would prolong Slovakia’s dependence on Russia.

Among central European neighbors, Hungary and the Czech Republic operate Gripens. Poland flies a large fleet of 48 F-16s while also keeping around 30 MiG 29s.Slovakia’s defense spending is due to rise from 1.2

percent of gross domestic product this year to 1.6 percent in

2020 and 2.0 percent by 2024.

NATO members have agreed to spend 2 percent of their gross domestic product on defense by 2024 and U.S. President Donald Trump, who was in Brussels for a NATO summit on Wednesday, has criticized members that are not meeting that commitment.