The main Spanish stock market index ended a three-day downward streak on Thursday as a climate of optimism settled in the markets after the United States cleared a first hurdle to avoid defaulting on its debt.

The U.S. Congress approved the bill to avoid the damaging default and passed it to the Senate, which has to decide whether to enact the measure before Monday, when the country is expected to run out of money to pay its bills.

The Fed also contributed to the good mood following messages from two central bank officials, who advocated a pause in interest rate hikes at the June 13-14 meeting.

On the European side, there was also positive news: European Central Bank Vice President Luis de Guindos said that the tightening cycle was nearing its end, and eurozone inflation gave investors a happy surprise by falling more than expected to 5.3%, indicating that the ECB's measures are bearing fruit.

Thus, at 17:36 on Thursday, Spain's selective Ibex-35 stock market index was up 123.30 points, or 1.36%, to 9,173.50 points, while the FTSE Eurofirst 300 index of large European stocks was up 0.76%.

In the banking sector, Santander rose 2.28%, BBVA gained 2.22%, Caixabank advanced 3.50%, Sabadell gained 4.24%, Unicaja Banco rose 1.68%, and Bankinter gained 2.88%.Among the large non-financial stocks, Telefónica fell 1.23%, Inditex advanced 0.51%, Iberdrola gained 0.96%, Cellnex gained 0.21%, and the oil company Repsol rose 2.40%.

(Information by José Muñoz, edited by Emma Pinedo).