Nani has committed his future to Manchester United by signing a new five-year contract to keep him at Old Trafford until 2018.
It ends speculation about his future and means that, if Nani sees out his deal, he will have been a United player for 11 years.
The Portugal winger, whose previous contract was due to expire next summer, had been the subject of interest from clubs including Juventus, Monaco, Galatasaray, Zenit St Petersburg and Anzhi Makhachkala over recent months.
Nani, who was a £17 million signing from Sporting Lisbon in 2007, said manager David Moyes’ belief in him helped persuade him to stay.
He told United’s official website: "Playing at United has been a fantastic experience for me. When I came to the club, I never imagined the success we have enjoyed.
"Training every day with top players who want to win trophies every year is a great motivation to me. I'm very happy that the new manager has shown this faith in me and I'm looking forward to helping the team compete for more honours this season."
Manager Moyes added: "I'm really pleased Nani has re-signed for the next five years. He has great ability and experience beyond his 26 years. I've been impressed with his approach to training and look forward to working with him in the coming seasons."
After an injury-hit pre-season, Nani made his first appearance under Moyes as a substitute in Sunday’s 1-0 defeat to Liverpool.
He has played 213 times for United, scoring 40 goals and has helped the club win four Premier League titles and the Champions League in 2008.
He also won the United Players’ Player of the Year award in 2010-11, when he scored 10 goals and was voted a member of the PFA team of the season.