The 25-year-old joined the Magpies from his hometown club CD Tenerife in June 2014 and scored on his first Premier League start against Tottenham that October.
He made 195 appearances for United in all competitions, scoring 48 goals. Of those strikes, 33 came in the top flight, making him the club's ninth all-time leading Premier League goalscorer.
Pérez was a key part of the Sky Bet Championship title-winning side of 2016/17 and won the NUFC TV goal of the season award three times.
Everybody at Newcastle United would like to thank him for his service, and wish him well for the future.