Manchester United goalkeeper David De Gea has signed a new contract that will keep him at Old Trafford until at least June 2023. The club also have an option to extend the deal by an additional year. De Gea, 28, had entered the final year of his contract and would have been able to open talks with clubs outside England over a possible move in January. The Spain international, who has made 367 appearances for United since joining the club in 2011, almost joined Real Madrid in 2015 and has been regularly linked with a move back to La Liga in recent seasons. "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," De Gea told United's website. "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. "As one of the senior players in the squad, I want to support and lead in any way that I can to assist the younger players, so they know what it means to play here." Manager Ole Gunnar Solskjaer said De Gea was a vital part of his plans to take United back to the summit of the English game. "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," the Norwegian said. "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." United are fourth in the table after five games, with two wins, two draws and one defeat. They host Astana in the Europa League group stage on Thursday before visiting West Ham United in the Premier League on Sunday.