* Graphic: World FX rates in 2018 http://tmsnrt.rs/2egbfVh
* Graphic: Trade-weighted sterling since Brexit vote http://tmsnrt.rs/2hwV9Hv
LONDON, Dec 13 (Reuters) - Sterling gave up most of the gains it made after Prime Minister Theresa May survived a no-confidence vote overnight as signs that the British parliament was headed towards deadlock over Brexit prompted traders to take profits.
A weakened May was set to ask European leaders for help after a mutiny by more than a third of her lawmakers failed to dislodge her but showed the scale of opposition to her deal for exiting the EU.
"Sterling made a cautious recovery from the 20-month lows but it is mindful and fragile of the ongoing situation and there is a long way to go," said Jamie Jemmeson, head of structured products at Infinity International, an FX risk management firm.
The pound climbed after its best day in six weeks moved it off 20-month lows. But the gains were fleeting as currency markets digested the tough task that May had ahead of her to win concessions from the EU over her Brexit deal.
It was trading flat at $1.2628 after climbing to an intraday high of $1.2687 per dollar. Against the euro , the pound was a shade firmer at 89.88 pence.
"With every `flesh wound' May seems able to bounce back, but last night's vote has brought home just how tough a task she faces," said CMC Markets' analyst Michael Hewson.
"It is highly unlikely the (Brexit) agreement will make it through parliament whatever tweaks May can wrangle out of EU leaders, so expect further sterling weakness," he added.
Investors have shied away from betting on the pound in recent months because of political instability and high volatility.
Sterling is still near the bottom of its recent range and is headed for a weekly loss, with just over three months to go until Brexit and no further clarity on the outcome.
With Britain due to leave the EU, parliament's opposition has suddenly opened up possibilities. Among them are a disorderly exit with no deal or even another referendum on EU membership.
Most investors still think the British parliament will eventually back a "softer Brexit" rather than a clean break from the EU, although nervousness about the outcome has left the pound trading within tight ranges.
May is heading to a summit in Brussels after her meetings, with EU leaders so far this week have failed to yield the legal assurances on the Irish border that lawmakers are seeking. (Reporting by Tom Finn; editing by Richard Balmforth)