David de Gea has signed a new four-year contract with Manchester United.
The announcement of the deal completes a remarkable turn of events after the Spain goalkeeper was on the brink of joining Real Madrid last week before the transfer collapsed on deadline day in Spain.
United said in a statement released on their official Twitter account: "David de Gea has signed a new four-year contract at #mufc with an option to extend for a further year."
De Gea added in an official club statement: "I am delighted to be starting this new chapter in my United career.
"I have always enjoyed playing with these great players in front of our fantastic fans. Manchester United is a special club and Old Trafford is an ideal place for me to continue to develop my career.
"I'm looking forward to putting a difficult summer behind me and concentrating on working hard to improve and help my team-mates to be successful."
Louis van Gaal was understandably pleased by the fact that De Gea had committed his future to the club.
"I am absolutely delighted David has signed a new contract," the United manager said.
"He is one of the best goalkeepers in world football. I am very pleased that he will be part of the team for many years to come.
"David made a very important contribution to our performance last season and he has been the club's Player of the Year for the last two seasons.
"He is a popular player who is keen to learn and enhance his game. At such a young age for a goalkeeper, he has many years ahead of him."