The 21-year-old midfielder was rewarded for his impressive spell on loan with Granada last season, where he scored five goals in 35 league matches.
He has snce agreed a new loan spell away with Valencia for this season, where he will continue his development under the watchful eye of Marcelino Garcia Toral.
Pereira told the club’s official website: “I am delighted that I have extended my contract with this great club.
“The manager is building a great team here and I want to be part of that as soon as possible. I am going to continue my development at Valencia this season in the hope that I will get plenty of minutes on the pitch.
“I would like to thank the manager for his help and guidance and for the faith he has shown in me.”
United boss Jose Mourinho added: “Andreas is already a very good footballer. He is a young player with great natural ability and a good attitude towards continuing his development.
“I have no doubt that he has the potential to be one of the future great players of this club.”
A Brazil under 23 international, the Belgium-born Pereira joined Manchester United from PSV Eindhoven as a 16-year-old in 2014. He has played 13 times for the first side.