* Graphic: sterling and gilt yields http://bit.ly/2dgAXn1
* Graphic: World FX rates in 2017 http://tmsnrt.rs/2egbfVh
* Graphic: Trade-weighted sterling since Brexit vote http://tmsnrt.rs/2hwV9Hv (Adds details, quotes)
LONDON, Dec 8 (Reuters) - Sterling gave up earlier gains and turned lower on the day against the euro on Friday as investors took profits after a sharp rally in recent days.
A breakthrough in Brexit negotiations sent sterling rallying to a six-month high against the euro earlier in the day on investor relief that the talks will move forward to a trade and transition arrangement next week at a key EU summit.
But with the economy still facing headwinds, traders were quick to take profits on sterling, especially against the dollar and the euro, pushing it down the day.
"I think we've seen a classic case of the rumor being bought and the fact sold, with sterling having rallied early last week in anticipation of a deal being close," said OANDA analyst Craig Erlam.
The European Commission said enough progress had been made after the two sides worked through the night to reach a deal over the status of the Irish border, which had scuppered an earlier attempt to clinch a deal on Monday.
"We could see more upside in the pound in the coming months but as it was before, the road ahead is bumpy and that will be reflected in the currency markets."
Sterling strengthened to 86.90 pence per euro on the news, its strongest since June 9, before giving up all its gains to trade down on the day at 87.45 pence. It had rallied more than 3 percent in the last eight days.
On a trade-weighted basis, the pound climbed to its strongest level since May. Against the Swiss franc , it has now recovered almost all the losses suffered since the vote for Brexit 18 months ago, trading at its strongest since June 24, 2016.
ELEVATED POLITICAL RISKS
But RBC strategists said Brexit negotiations aside, the economy remained in a fragile state with the Bank of England's November hike seen widely as a "one and done" thing.
"Political risk for sterling also remains elevated, though markets may have lost sight of this given the improving prospects of Brexit negotiations moving forward at the mid-December European Council meeting," RBC Capital Markets strategists wrote in a 2018 outlook note.
The Commission's recommendation that sufficient progress has been made will now go to the European Union summit of leaders taking place next week.
Draft guidelines showed the transition period would last around two years. During that time, Britain will remain part of the customs union and single market but will no longer take part in EU institutions or have a vote. It will still be subject to EU law.
"If the UK and EU can quickly agree a transition deal of at least two years in the first quarter of 2018, then we will have three years until any major changes happen because of Brexit," said Nomura currency strategist Jordan Rochester.
"This takes it beyond the scope of the market or MPC (Bank of England monetary policy committee) to really worry about. In other words, the key change next year is that the markets sensitivity to Brexit negotiations should fall substantially and stop weighing so much on UK yields and sterling."
Sterling jumped to as high as $1.3521 on the news, then edged back to just below $1.35 as the dollar climbed across the board.
"We are optimistic that agreeing a transition deal will not prove difficult," said MUFG currency strategist Lee Hardman.
"Both sets of negotiating principles released at the very beginning make clear what would be expected if a `status quo' transition period is required. Our optimistic forecast for the pound going forward - above the $1.40 level in 2018 - is now more achievable after this important step today."
(Additional reporting by Abhinav Ramnarayan; Editing by Toby Chopra)