NEW YORK, June 7 (Reuters) - U.S. stocks and Treasury yields rose on Wednesday after the release of written testimony from ex-FBI chief James Comey, with investors looking ahead to his U.S. Senate appearance on Thursday, the same day as a British parliamentary vote and a European Central Bank meeting.

A smoothly-executed rescue of Spain’s Banco Popular lifted bank stocks in Europe, while oil prices suffered a steep slide after the U.S. government reported an unexpected increase in crude and gasoline inventories.

U.S. light crude was last down 4.7 percent to $45.94 per barrel, with Brent 3.75 percent lower at $48.24.

Struggling Banco Popular was absorbed by Spain’s biggest bank Santander for a nominal 1 euro, the first use of a regime to deal with failing banks adopted after the 2008 financial crisis.

The success of the process pushed shares in many major banks higher, supporting a recovery for Madrid’s stock market that lost steam later in the day.

European banking shares closed up 0.87 percent.

“The market has taken Banco Popular as positive news because essentially this is not a bankruptcy but a sort of rescue, even if its subordinated bondholders have been sharply hit,” said Giuseppe Sersale, a fund manager at Anthilia Capital in Milan.

The bank rescue does, however, underline the risks to growth, banking and government debt burdens that are likely to delay a major switch in language and policy direction by the ECB at its meeting on Thursday.

The pan-European FTSEurofirst 300 index lost 0.08 percent and MSCI’s gauge of stocks across the globe shed 0.04 percent.

The euro turned shaky after reports suggested the ECB would lower its inflation targets. It was last down 0.15 percent to $1.126.

“But (for us) that would be a huge euro buying opportunity, because ECB normalisation is coming. And when it does, the euro simply won’t be able to sustain undervalued levels for long.”

The ECB meeting is one of three events that ING currency strategist Viraj Patel said had been dubbed ‘Triple Threat Thursday,’ an event-filled day that could send global markets on a bumpy ride.

Also on Thursday will be a surprisingly closely-fought British election and U.S. Senate testimony from Comey, the former FBI chief fired by President Donald Trump.

In a written statement posted on the web on Wednesday, Comey said Trump asked him to back off from a probe into former national security advisor Michael Flynn and told Comey, “I need loyalty. I expect loyalty.”

The Dow Jones Industrial Average rose 41.32 points, or 0.2 percent, to 21,177.55, the S&P 500 gained 3.35 points, or 0.14 percent, to 2,432.68 and the Nasdaq Composite added 14.78 points, or 0.24 percent, to 6,289.84.

“I don’t see anything in it that will lead to an imminent impeachment. We are not learning anything new. The market doesn’t see it as any worse than what we know right now. There is nothing criminal,” said Gene Tannuzzo, senior portfolio manager at Columbia Threadneedle in Minneapolis.

Any damaging revelations in Comey’s testimony could take the wind out of his plans to roll back regulations and overhaul the tax system - an agenda that had sent the dollar to 14-year highs earlier this year.