The IBEX 35 opened Wednesday with a gain of nearly 3%, driven by a relief rally across financial markets following an agreement between the United States and Iran for a two-week truce, which could pave the way for the reopening of the Strait of Hormuz and a broader resolution to the conflict.

The Middle East truce has provided some respite to markets amid expectations that oil and gas flows through the strait will resume.

The news brings a temporary end to weeks of volatility and geopolitical upheaval after U.S. and Israeli strikes against Iran in late February kept markets on edge, while Tehran throttled a strategic maritime route that typically carries around 20% of global energy supplies.

U.S. President Donald Trump agreed to the ceasefire on Tuesday with less than two hours to spare before his ultimatum for Iran to reopen the strait or face "devastating" strikes against its civilian infrastructure.

Against this backdrop, U.S. crude futures fell by around 15% to 96.31 dollars per barrel, while Brent futures also shed 13% to 94.71 dollars per barrel.

The war had sent oil prices soaring, reignited inflationary fears, and disrupted the global interest rate outlook. Trump's announcement on social media marked an abrupt pivot from hours earlier, when he issued an extraordinary warning, indicating that "an entire civilization" would perish if his demands were not met.

Nevertheless, investors are waiting to see if the ceasefire leads to a broader exit strategy before taking major positions. The reality that a definitive resolution has yet to be reached and that the truce may be fragile leaves markets particularly sensitive to headlines and developments in negotiations.

Analysts do not expect energy prices to return to pre-war levels due to extensive damage to part of the region's energy infrastructure.

"(...) focus will remain on developments in Hormuz, whether traffic effectively resumes and crude flows normalize, allowing for further price de-escalation. For now, today is about celebration and relief," Bankinter analysts noted in their morning briefing.

These experts point out that, given the shift in the geopolitical landscape, "expectations for rate cuts are back on the table: in the U.S., moving from a probability of practically 0 to pricing in a -25bp cut in 2026."

On the macroeconomic front, the session will bring only indicators of limited relevance, such as producer prices and retail sales in the eurozone. Markets will also be watching the minutes of the Fed's latest Federal Open Market Committee meeting, to be released later in the day.

With these factors in play, at 0704 GMT, the Spanish benchmark IBEX 35 was up 495.30 points, or 2.84%, at 17,939.60 points, while the FTSE Eurofirst 300 index of leading European shares advanced 2.58%.

In the banking sector, Santander rose 6.90%, BBVA gained 6.56%, Caixabank advanced 4.01%, Sabadell climbed 4.50%, Bankinter appreciated by 4.42%, and Unicaja Banco rose 4.62%.

Among large-cap non-financial stocks, Inditex and oil major Repsol were unchanged, Iberdrola appreciated by 1.28%, and Cellnex gained 2.75%.

Among individual stocks, Telefonica stood out, rising 1.34% after announcing it will sell its Mexican business to a consortium for 450 million dollars.

(Reporting by Tomás Cobos and Benjamín Mejías Valencia)