Fenerbahce winger Nani has joined Valencia on a three-year contract.
The Portugal international, who played for Manchester United from 2007 to 2015, will be part of his national side's line-up in Wednesday's Euro 2016 semi-final against Wales in Lyon.
He has represented his country on 101 occasions, scoring 20 goals including two at this summer's European Championship where he has started all five matches.
Nani, who had been a target for Stoke City, returned to his home town club Sporting Lisbon on loan for the final season of his eight-year stay at Old Trafford but decided against making the move permanent.
The 29 year-old spent the 2015/16 campaign at Fenerbahce, scoring 12 goals in 46 appearances, before making the move to La Liga.
No details of the deal were made public by the club but Spanish media report a transfer fee of around 8.5m euros (£7.2m).
In a statement. the club said: "Valencia Club de Futbol have reached an agreement with Portuguese international Luis Carlos Almeida - 'Nani' - for the player to join the club for the next three seasons."