The Magpies came racing out of the traps and took a fifth-minute lead through Joselu, but Riyad Mahrez’s rasping strike saw the two sides head into the break on level terms.
A deflected goal apiece – Demarai Gray for the Foxes, Dwight Gayle for Newcastle – paved the way for an end-to-end closing 15 minutes, with both teams sensing a winner.
Unfortunately for United, though, it was the visitors who snatched it, Pérez’s attempted intervention flying past a helpless Karl Darlow to take the wind out of the Magpies’ sails.
After a rousing pre-match flag display to mark the club’s 125th anniversary, Newcastle got a milestone evening off to a dream start. Jacob Murphy set Gayle away down the left with a superb pass with the outside of his boot, and the forward held his line before seeing a low cross deflect off the leg of Wes Morgan and into the path of Joselu, who made no mistake from six yards.
United looked firmly in the ascendancy early on, and almost doubled their lead through Gayle, who gathered a precise Mikel Merino ball before firing just wide of the far post.
Leicester, however, started to get a foothold as the first half wore on. England Under-21 international Gray looked particularly dangerous, stinging the palms of Darlow from a tight angle, before curling narrowly off-target after a fine piece of footwork.
And, with 20 minutes played, parity was restored. A misplaced Merino pass handed possession to Gray just inside United’s half, and the youngster picked out Mahrez 30 yards out. The Algerian still had a lot to do as he embarked on a marauding run forward, but – after working the ball onto his left foot – he let fly with a powerful effort which found the top corner.
Marc Albrighton and former Magpie Danny Simpson both came close in the following exchanges, but Newcastle found their feet again as the interval drew closer, Murphy almost re-establishing their lead after gathering a stray Ben Chilwell ball.
On the whole, though, the break came at a good time for United, and Rafa Benítez’s side were the first to threaten in the second half, as Joselu nodded a Matt Ritchie corner wide of the near post.
But, with exactly 60 minutes on the clock, the Foxes took the lead for the first time. Mahrez’s switch was met by Albrighton just outside the penalty area, and the wide-man’s lay-off was collected by Gray, who took a touch before seeing a right-footed drive take a wicked deflection off Florian Lejeune and swerve into the near corner of the net.
The Magpies, however, hit back in similar fashion. With Leicester struggling to clear their lines after Christian Atsu’s corner from the left, Merino rose high to help the ball into Gayle’s path, and the forward stepped back inside before unleashing a left-footed strike which clipped Harry Maguire before squirming past Kasper Schmeichel.
With the Gallowgate faithful in full voice, Gayle almost completed a quick-fire turnaround two minutes later, sending a low drive agonisingly wide of the upright after running onto Joselu’s threaded pass.
The game looked to be there for Newcastle’s taking, but, with less than five minutes remaining, Pérez’s own goal saw the pendulum swing back Leicester’s way. Jamie Vardy latched onto a lofted ball over the top, and picked out the unmarked Shinji Okazaki in the centre of the penalty area. The Japanese frontman hesitated and looked to have blown his opportunity, but the Spaniard’s misjudged interception dropped the wrong side of the post, condemning the Magpies to a sixth defeat in seven outings.