Manchester United's David de Gea. (Photo: AFP/Adrian Dennis) |
United said in a statement that the club had 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 new deal, which will see De Gea earn between €395,000 (US$437,000) and €423,000 (US$466,000) per week, has made the Spaniard the world's highest-paid goalkeeper.
The Spain international has made 367 appearances for United since joining the club in 2011.
"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.
What the stars mean:
★ Poor ★ ★ Promising ★★★ Good ★★★★ Very good ★★★★★ Exceptional