Microsoft has committed to investing $2.1 billion in cloud computing and artificial intelligence (AI) infrastructure in Spain over the next two years.

The planned investment was shared by the vice chair and president of Microsoft Brad Smith via a post on X following a meeting with the Prime Minister of Spain, Pedro Sanchez.

Brad Smith and Pedro Sanchez
Brad Smith and Spanish Prime Minister Pedro Sanchez – Pedro Sanchez via X

"I’m thrilled to announce that we will expand our AI and cloud infrastructure in Spain by $2.1bn in the next two years," Smith said. "Our investment is beyond just building data centers, it’s a testament to our 37-year commitment to Spain, its security, and development and digital transformation of its government, businesses, and people."

Prime Minister Sanchez added: "In addition, we have analyzed cooperation opportunities to strengthen cybersecurity and promote artificial intelligence in Public Administration. Public-private collaboration is essential to successfully face the challenges of digital transformation."

Microsoft has previously invested in AI in Spain with its 2021 R&D hub in Barcelona which is dedicated to artificial intelligence, machine learning, and deep learning.

The company first announced plans for a Spanish Azure cloud region in early 2020, and will be the last of the major providers to set up there. The company is currently developing data centers in Madrid and the Aragon region.

The former will be constructed by Ferrovial as confirmed in January 2023. Microsoft ultimately plans to operate three data centers in Madrid.

The Aragon data center development, announced in October 2023, is reported to be three sites around the city of Zaragoza; A 63-acre site in the Recycling Technology Park (PTR), as well as land in La Puebla de Alfindén to the east of Zaragoza, and La Muelato to the west. Build-out is reportedly expected over seven years.

Google was the first to launch a Spanish region, opening one in Madrid in May 2022. Amazon launched an AWS cloud region in Aragon in November 2022. Oracle opened a Madrid region in September with plans for a second in the works.

The latest investment commitment comes shortly after Microsoft announced that it was committing $3.44bn to doubling Germany's AI infrastructure and cloud computing capacity.

As with the Spanish investment, this will be delivered over two years, with some of the money dedicated to training 1.2m people in Germany with AI skills.