Greece finalised a deal worth up to €600 million ($671 million) to buy three Brazilian-made Embraer EMBJ3.SA KC-390 military planes on Monday, with an option for three more of the aircraft which are partly produced in Portugal.

The agreement was signed in Athens by Greek Defence Minister Nikos Dendias and his Portuguese counterpart Nuno Melo, a Greek defence official told Reuters. The deal was approved by the Greek parliament in June.

“The Hellenic Air Force will receive its first KC-390 Millennium in 2027,” Embraer said in a press release.

The acquisition gives the Greek Air Force, for the first time, an aerial refuelling capability for its fleet of fighter jets. The cost for the three KC-390 planes, which can also be used for military transportation, is about €550 million to €600 million, the Greek official told Reuters.

Greece, which currently operates both the C-130 and C-27, plans to spend about €28 billion ($31.29 billion) by 2036 to modernise its armed forces as it emerges from a 2009 to 2018 debt crisis.

Portugal’s OGMA, 65%-owned by Embraer with the remainder held by the Portuguese state, is a key industrial partner in the C‑390 programme, producing parts of the central fuselage that are shipped to Brazil for final assembly.

The Iberian country was the first European and NATO country to place an order for the C-390, in 2019, and has received some units in previous years.