* UK CIPS/IHS Markit June Flash Services PMI holds at 53.4
* Elections for two parliamentary seats on Thursday
* Defeat may spur party lawmakers to move against Johnson
* Graphic: World FX rates in 2022 http://tmsnrt.rs/2egbfVh
* Graphic: Trade-weighted sterling since Brexit vote http://tmsnrt.rs/2hwV9Hv (Updates rates)
By Joice Alves
LONDON, June 23 (Reuters) - Sterling trimmed some of its losses on Thursday after better-than-expected UK PMI numbers for June, but the pound remained vulnerable to political risks and recession fears.
The PMI's preliminary composite index held at 53.1 in June, above the median forecast of 52.6 in a Reuters poll of economists, and unchanged from May.
The pound flattened against the U.S. dollar to $1.2261 at 1505 GMT, having earlier fallen below $1.22.
Against a weakening euro, sterling rose 0.3% on the day at 85.83 pence, having earlier touched a one-week low..
"Markets are likely reading the UK survey results in comparison with the euro zone ones, which instead showed a larger drop than expected," said Francesco Pesole, FX strategist at ING.
The numbers "partly – and temporarily – ease some market concerns about the UK economic outlook, supporting the current aggressive Bank of England rate pricing".
Jane Foley, head of FX strategy at Rabobank in London, added: "it is a relief to the market that the UK services PMI was not weaker due to the long Jubilee weekend".
The BoE raised its benchmark rate by 25 bps to 1.25% on June 16 and said it was ready to act "forcefully" if needed to stamp out dangers posed by inflation, despite fears that the rising cost of borrowing could further harm the economy.
Investors were also on watch for further signs of political instability as the ruling Conservative Party was contesting two by-elections on Thursday: one in Tiverton and Honiton in the southwest and another in Wakefield in the north.
A defeat in either place could spur Conservative lawmakers to find a way to oust Prime Minister Boris Johnson after months of scandal.
"Losses for the Tories today will contribute to the ongoing clouds hanging over the PM’s prospects as party leader," said Rabobank's Foley.
"They will therefore likely serve as a reminder of the distractions created by the behaviour of various party officials, which is a negative factor for investment confidence and the pound."
In the meantime, strikes have crippled Britain's rail network this week as union bosses, train operating firms and the government faced off over demands that workers' pay increases keep pace with galloping inflation, at a 40-year high of 9.1% in May.
Official data published on Thursday showed that surging debt interest costs triggered by the leap in inflation forced the British government to borrow more than expected in May at 14 billion pounds ($17.14 billion).
(Reporting by Joice Alves Editing by Mark Heinrich/Toby Chopra/Ken Ferris)