Sterling gained slightly versus the dollar on Wednesday, recovering from a dip earlier in the session, but slid against the euro after data showed Britain's economy stagnated unexpectedly in July, as manufacturing output fell.

British economic output showed no change in month-on-month terms in July, as it did in June, data from the Office for National Statistics showed.

A Reuters poll of economists had forecast 0.2% month-on-month growth in gross domestic product.

"We should not worry too much about the miss," analysts at Peel Hunt said in a note, pointing to still healthy forward-looking business activity surveys and highlighting the known volatility of monthly data, particularly in heavy industries.

Also analysts at JPMorgan said July economy output is not indicative of the trend. However, upside risks to third-quarter GDP growth have faded, they said.

Deutsche Bank senior economist Sanjay Raja said that after seeing upside risks to third-quarter GDP growth, relative to the bank's baseline of 0.4% quarter on quarter, it now sees downside risks building.

Sterling edged up 0.1% to $1.3093, after sliding to $1.3071 earlier in the session.

The dollar fell to its lowest against the yen this year after investors increased the chances of Democrat Kamala Harris beating Republican rival Donald Trump in November's presidential election after a scheduled debate.

The pound fell 0.7% against the yen to 185.05 yen, around its weakest in a month.

Investors were also awaiting a key U.S. inflation report that could provide indication of how aggressively the Federal Reserve will cut rates next week.

The euro rose versus sterling, trading 0.14%higher at 84.37 pence.

The Bank of England is expected to keep interest rates unchanged next week, although markets show traders believe it could cut once more this year, probably in November .

In the coming weeks, focus in UK markets will also be on the new Labour government's first budget next month.

Banks in Britain are intensifying their lobbying against potential tax hikes in the upcoming budget on Oct. 30, amid worries it may tap the sector to boost public finances, senior industry sources told Reuters.

(Reporting by Linda Pasquini; Editing by Amanda Cooper and Jane Merriman)