Dani Alves has penned a new two-year deal with La Liga outfit Barcelona, keeping him at the club until 2017 despite previous uncertainty.

The 32-year-old was initially expected to depart from Camp Nou, and with his current deal expiring this summer, his agent had previously confirmed he would be leaving the Catalan giants on a free transfer.

However, after an offer from AC Milan, and firm interest from Manchester United and Paris Saint-Germain, the right-back has now taken a U-turn and remained with Luis Enrique’s side for another two years. The news comes just days after Barcelona completed their treble – lifting the Champions League after Copa del Rey and league success.

The new contract will also feature the option of a third year should the former Sevilla defender wish to continue at Barcelona, and it will be a huge sigh of relief for club officials. Despite the announcement of Aleix Vidal’s signing – also from Sevilla – a transfer embargo means a replacement for the three-time Champions League winner couldn’t have been signed until January 2016.

A new deal could be catastrophic news for Manchester United, who will now continue their hunt for a new right-back. Louis van Gaal has deemed Rafael da Silva surplus to requirements, and Antonio Valencia should be playing on the wing, meaning a full-back is one of the club’s main targets this year. However, with a deal for Nathaniel Clyne to be off, and Alves unlikely to wish to join Barcelona even if Manchester United offer a fee, a new target may be needed by the Dutchman.

Dani Alves has made over 200 appearances since joining for a reported £23 million fee in 2008.