Spain's main stock index closed almost unchanged on Thursday after the European Central Bank raised borrowing costs to their highest level in 22 years, to 3.5%, and left the door open to further hikes.

Investors also closely followed the ECB's upward revision of its inflation forecast for the next three years, in which it said it expects price growth to remain above its 2% target until the end of 2025.

"It's a restraining surprise, as inflation forecasts were revised up by more than expected, particularly for core. That's an indication of further tightening to come in the ECB's outlook," said Sebastian Vismara, macroeconomist and global strategist at BNY Mellon investment management in London.

Across the Atlantic, markets were still digesting the Federal Reserve's decision to leave interest rates unchanged, but leaving the door open to further hikes this year.

The day also saw a number of macroeconomic data releases in the United States, with retail sales unexpectedly rising in May and initial claims for state unemployment benefits remaining flat on a seasonally adjusted basis.

Spain's selective Ibex-35 stock market closed down 2.00 points on Thursday, down 0.02%, to 9,430.80 points, while the FTSE Eurofirst 300 index of large European stocks lost 0.07%.

In the banking sector, Santander lost 1.72%, BBVA retreated 0.62%, Caixabank advanced 0.98%, Sabadell fell 1.72%, and Bankinter dropped 0.38%.

Among the large non-financial stocks, Telefónica gained 0.61%, Inditex advanced 1.29%, Iberdrola gained 0.17%, Cellnex fell 0.19%, and the oil company Repsol rose 0.18%.

(Information by Benjamín Mejías Valencia; additional information by Gertrude Chávez-Dreyfuss; edited by Juana Casas)