COPENHAGEN (Reuters) - The Danish government reached an agreement on Thursday with coalition parties to proceed with the purchase of 27 F-35A stealth fighter jets from U.S. defense company Lockheed Martin Corp <LMT.N>, the defense ministry said.

The decision follows a May 12 announcement by Prime Minister Lars Lokke Rasmussen, who leads a minority government, supporting the acquisition of 27 fighter jets worth 20 billion Danish crowns ($3.1 billion), in line with a recommendation from an expert group appointed by the government.

The coalition expects to phase in the new radar-evading fighters between 2021-2026, with the first four to be delivered in 2021, six in 2022 and the remainder between 2023 and 2026, the defense ministry said.

The agreement marks a further gain for Lockheed, and comes just days before the F-35, the world's largest weapons project, is due to make its international air show premiere at Leeuwarden Air Base in the Netherlands on Saturday.

Lockheed welcomed the news and said it would continue to work with the U.S. government and the Pentagon's F-35 joint program office to support Denmark's procurement of the jets.

It said it would continue to work with Danish industry to map out possible supplier agreements for production and maintenance of the new jets. Countries that purchase F-35 jets usually get a proportional share of work on the overall program.

"The projected industrial opportunities with the F-35 will bring long term economic benefits to Denmark for decades to come," Lockheed said in a statement.

Denmark's decision deals a blow to rival Boeing Co <BA.N> which mounted an expensive last-ditch marketing effort for its older F/A-18E/F Super Hornet.

However, Boeing still hopes to win orders from the Canadian government, which is now studying how to cover a gap in its air force capabilities given delays in its fighter procurement plans and the advanced age of its current fleet of CF-18 jets.

Denmark would be the 11th country to buy the F-35A jets, joining the United States, Britain, Australia, Turkey, Italy, Norway, the Netherlands, Israel, South Korea and Japan.

"The fighter jets are central to our participation in international missions in the Balkans, in Afghanistan, in Libya and recently in Iraq in the fight against ISIL (Islamic State)," Rasmussen told a news conference in May.

The coalition acknowledged the Danish air force would have a reduced presence in international operations in the period between 2022-2026 due to the transition from the old F-16 jets. The air force will not participate in international operations between 2022-2024.

The parties also reserved the right to buy fewer than 27 fighter jets, if the initial deliveries were delayed or failed to meet the price criteria. A potential decision to buy more than 27 jets also remains on the table.

(Reporting by Nikolaj Skydsgaard; additional reporting by Andrea Shalal in Berlin and David Ljunggren in Ottawa; Editing by Keith Weir and Mark Potter)