LONDON, May 22 (Reuters) - Sterling held onto its gains, while UK stock futures fell on Wednesday, after Prime Minister Rishi Sunak called a general election for July 4.

The British currency was last up 0.25% on the day at $1.274, little changed from levels seen before Sunak started speaking outside his Downing Street residence.

Futures on the FTSE 100 stock index fell 0.7%. They had traded down 0.6% earlier in the day.

The blue-chip index earlier closed down 0.6%, while UK gilt yields rose sharply after British data showed inflation had slowed more slowly than expected in April, undermining the case for the Bank of England to cut interest rates as early as June.

"Currencies like political certainty and the pound is no exception. An election generates unknown variables and moving parts," Neil Jones, senior FX sales to financial institutions at TJM Europe, said.

"There is very heavy focus on the BoE and the dollar right now and that will remain key, we've just added another layer of significance into the mix for the pound," he said.

Sterling options volatility, a measure of trader demand for protection in the case of large price swings, rose for contracts that cover July 4.

Two-month options volatility rose by the most in one day since mid-April to 6.08%.

A UK election, by law must be held by Jan. 28, 2025, and speculation of an early election announcement had been building throughout Wednesday.

The opposition Labour Party has held a lead over the Conservatives of around 20 points in opinion polls since late 2021. Sunak took office in October of 2022.

A UK election has been widely anticipated this year, and was not expected to have any immediate baring on the outlook for the economy or Britain's debt trajectory.

Still, investors and analysts say that with an election date announced, markets would start to pay more attention to policy proposals, especially from the Labour Party as it leads in the opinion polls.

(Reporting by London markets team; writing by Amanda Cooper; Editing by Alun John and Dhara Ranasinghe)