Manchester United have confirmed that Nani has penned a new long-term contract that will keep him at Old Trafford until 2018.
The Portuguese winger joined Manchester United in 2007 and has gone on to make 136 appearances for the club.
There had been some speculation that the 26-year-old, who had one year remaining on his previous deal, could be heading towards the exit at Old Trafford, with Juventus said to be interested in securing his services.
However he stayed put during the summer transfer window, and has now been rewarded with a new contract extension.
"Playing at United has been a fantastic experience for me," Nani told Manchester United's official website.
"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."
Nani has won four Premier League titles, two League Cups and the Champions League during his time with Manchester United but has struggled with form and fitness in recent seasons.
He played just 11 Premier League games last season, while this term he has made just one substitute appearance after suffering a groin injury in pre-season.
Manchester United boss David Moyes said: "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."