Manchester United manager Ole Gunnar Solskjaer believes David De Gea is the world's best goalkeeper.
De Gea, who was out of contract at the end of the season, has agreed a new four-year contract with the club that will keep him at Old Trafford until at least June 2023, with an option for a further year.
Solskjaer said: "I am delighted that David has committed his long-term future to the club. Over recent years, David has proved himself to be the best in the world and a vital part of our plans as we look to take Manchester United back to where it belongs.
"David is a fantastic person and his outstanding quality provides the perfect base to our defence.
"Over his time here, David has really understood the values of playing for Manchester United and now represents everything you want in a goalkeeper.
"As a player he is still hugely determined and hungry to achieve more. We all look forward to working together to meet those ambitions over the coming years."
De Gea joined United from Atletico Madrid in 2011 and has made 367 appearances for the club.
De Gea said: "It has been a privilege to spend eight years at this great club and the opportunity to continue my career at Manchester United is a genuine honour.
"Since I arrived here, I could never have imagined I would play over 350 games for this club. Now my future is fixed, all I want is to help this team achieve what I believe we can and win trophies again, together."
De Gea has won the Premier League, the FA Cup, the League Cup and the Europa League since arriving at Old Trafford.
The Spain international added: "I still feel that I have so much more to achieve at the club and I truly believe that Manchester United can build on the club's tradition of success and reward our fans for their support."