HELSINKI/WASHINGTON - Finland signed a $9.4 billion agreement on Friday to buy U.S. F-35 fighter jets, reaching a deal to bring 64 radar-evading warplanes to a country bordering Russia at a time of high tensions between Moscow and the West over Russian troops massed near the Ukrainian border.

However it will be some years before the planes enter service. Finland has previously said the planes would begin to be deployed in 2027.

In addition to the planes, the contract with U.S. government and planemaker Lockheed Martin LMT.N includes maintenance equipment, spare parts and training services, Finnish Defence Forces said in a statement on Friday, adding an agreement to buy air-to-air ammunition would be signed later in 2022.

"The aim is to ensure that Finland's F-35 system has the best possible performance going into the 2030s," the Defence Forces said.

Finland, which was historically neutral during the Cold War, is a member of the EU but not of NATO. In recent years it has strengthened cooperation with the Western military alliance and its defence forces materiel policy is based on all new equipment being NATO-compatible.

Finland's government said the decision to buy the U.S. jets, announced in December, was part of long-term plans to boost the country's defences, not a response to the current confrontation between the West and Russia over Ukraine.

"It is part of our long-term planning and has nothing to do with the current situation as such," Finland's ambassador to the United States, Mikko Hautala, said in a statement.

Russia has massed more than 100,000 troops near its frontiers with Ukraine, and Western countries fear it is planning an attack. Moscow denies plans for an invasion but says it could take unspecified "military-technical" action unless demands are met, including a promise to admit no new countries to NATO and to withdraw Western forces from Eastern Europe.

Finnish Prime Minister Sanna Marin said in January the country had no plans at present to apply to join NATO, but added the Nordic nation retains the right to join if it so wishes.

(Reporting by Mike Stone in Washington and Anne Kauranen and Essi Lehto in Helsinki Editing by Peter Graff and Frances Kerry) ((;;))