Ukraine's President Volodymyr Zelensky and Spanish Prime Minister Pedro Sanchez signed a 10-year bilateral security agreement between the two countries on May 27.
Spain has become the 10th country to sign such an agreement, together with the U.K., Germany, France, Denmark, Italy, Canada, the Netherlands, Finland, and Latvia.
The treaties are based on a pledge made by the Group of Seven (G7) countries last July and are designed to help Kyiv fend off Russian forces and deter future aggression.
Under the agreement, Spain will provide Ukraine with the support of 1 billion euros ($1.1 billion) in 2024 and 5 billion euros ($5.4 billion) by 2027, Sanchez said during a press conference.
This year's package will include air defense support to help Kyiv repel Russian aerial attacks, he added.
Spain will also continue to supply Ukraine with modern military equipment, support medical training and prosthetics for soldiers, and strengthen Ukraine's maritime security.
The two countries will deepen cooperation in intelligence, fight against organized crime, and defense industry. The agreement also covers humanitarian aid, recovery assistance, and support for Ukraine's EU and NATO membership and its 10-point peace formula.
The document also addresses sanctions against Russia and mechanisms to compensate for war damages and for bringing the aggressor to justice.
Zelensky arrived in Spain earlier on May 27, announcing the plans to sign a bilateral deal later during the day.
The Spanish newspaper El Pais reported that the new military aid package would include over a dozen Patriot anti-aircraft missiles and 19 second-hand German-made Leopard 2A4s as well as other Spanish-made weapons.