Tottenham lost their first league game since the opening day, going down 2-1 at home to Newcastle.
It was Newcastle’s second win in a row, the first time they have managed that ‘feat’ since November 2014.
Spurs looked on course for another routine victory when Eric Dier headed home in the first half but two Newcastle substitutes turned the game on its head as first Aleksandar Mitrovic equalised with 16 minutes remaining before Perez completed the comeback in stoppage time.
The defeat brings an end to Tottenham’s 14-match unbeaten run in the league while Newcastle climb out of the relegation zone into 15th.
Spurs knew three points would see them move into the Champions League places for the first time this season but Mauricio Pochettino’s men fell flat as Newcastle completed a second consecutive victory for the first time since November 2014, to follow up last weekend’s surprise win over Liverpool.
Tottenham dictated possession early on but found Newcastle difficult to break down and they were grateful to Papiss Cisse in the opening five minutes when he blocked Siem De Jong’s goalbound shot.
Otherwise, apart from referee Roger East tripping himself up, there was little for either side to cheer about and it took 36 minutes for Spurs to carve out their first real chance.
Carroll’s clever ball through released Danny Rose, who cut back to Erik Lamela but the Argentinian’s bending finish was palmed wide by Rob Elliot.
Elliot was called into action again two minutes later and again it was Lamela he denied, as the winger latched on to Harry Kane’s flicked header but saw his snap half-volley fly straight at the Newcastle goalkeeper.
From the resulting corner, however, Spurs did break the deadlock as Fabricio Coloccini let Dier run free and the midfielder jumped above Moussa Sissoko at the near post to head home his third goal of the season.
Suddenly Tottenham looked more threatening and they almost doubled their lead before half-time when Christian Eriksen’s shot fell fortuitously into the path of Rose – but his stinging drive evaded both the far post and Kane sliding in.
The interval came at a good time for Newcastle, who stormed out of the blocks after the restart and should have equalised when Cisse was sent clear by Sissoko – but the striker dragged his finish wide.
The visitors were faster on the ball than Tottenham and sharper in their pressing, and in the 73rd minute they deservedly found an equaliser when Chancel Mbemba’s header was poked in on the line by Mitrovic after Toby Alderweireld and Hugo Lloris failed to clear.
Both sides pushed forward late on in search of a winner and Newcastle went close when Sissoko’s fizzing cross was almost converted by Mitrovic – but the forward was just unable to reach it.
Spurs failed to heed the warnings and Perez made them pay when he sneaked inside Jan Vertonghen before half-volleying past Lloris at the near post.