Aug 10 (Reuters) - Spain's main Ibex-35 stock index posted its biggest gain in more than two months on Thursday after U.S. inflation rose less than expected in July, underpinning belief among investors that the Federal Reserve's interest rate hike is nearing an end.

U.S. consumer prices rose 3.2% last month versus the 3.3% forecast by economists polled by Reuters, ending a slowdown that had been recorded over the previous 13 months.

The slight uptick is due to the fact that it was calculated from a lower base - in June the increase was 3% - considering that prices started to decline in July last year after soaring at a pace not seen in more than 40 years.

After the inflation data was released, the Spanish selective consolidated the gains it had registered during the morning, following the trend of the other European markets, supported by the optimism of US equities.

"The market reacted with rises in view of the fact that the Fed could bend its stance and adopt a pause in the pace of rate hikes for the next meeting in September," Franco Macchiavelli, head of Admirals Spain, said in a note.

"However, we could not be sure of a central bank stance yet, in view of the fact that data on August would be missing to get a more homogeneous reading heading into early September," he warned.

According to the CME's FedWatch tool, markets put the probability that the Fed will leave rates unchanged in September at 90.5%.

The Ibex-35 closed up 147.80 points on Thursday, up 1.58%, to 9,502.20 points, while the FTSE Eurofirst 300 index of large European stocks rose 0.78%.

In the banking sector, Santander rose by 2.76%, BBVA by 3.70%, Caixabank by 1.38%, Sabadell by 1.16%, Bankinter by 0.80% and Unicaja Banco by 1.30%.

Among the large non-financial stocks, Telefónica gained 1.88%, Inditex 1.05%, Iberdrola 1.34%, Cellnex 1.33% and the oil company Repsol 1.14%.

Outside the Ibex, the shares of the construction company Técnicas Reunidas soared 6.5%, extending the gains of the previous round, after winning a contract to expand gas processing in the United Arab Emirates for 3.6 billion dollars.