Loic Remy alleviated some of the pressure on manager Alan Pardew as his double helped Newcastle to a 2-1 win in the Premier League at Cardiff.
The French striker took his tally to five goals in his past three appearance as he produced two excellent first-half finishes to put the Magpies in control at Cardiff City Stadium.
The visitors surrendered the initiative after the break as Cardiff, inspired by substitute Jordon Mutch, pulled a goal back from Peter Odemwingie but they could not find a leveller.
The abject first-half display in Monday's defeat at Everton had further increased speculation over Pardew's future and, despite this win, he must again be wondering how his side can turn in such different performances in two halves of the same game.
During the first half there was no lack of commitment or bite, with the outstanding Yohan Cabaye marshalling a midfield which enjoyed complete control in the middle of the park.
But they could so easily have undone all their good work as they took their foot off the gas after the break, although they did not ultimately pay for it.
From the first whistle Cardiff had looked ill at ease dealing with Papiss Cisse and Remy.
Cisse failed to control a lovely floated ball from Davide Santon when he should have done better, before Fraizer Campbell slipped as he rounded Tim Krul, after the goalkeeper failed to gather a punt forward.
That was as close as Cardiff came in the opening 45 minutes, as they spent much of the rest of the half on the back foot.
Remy almost opened the scoring when the ball fell to him after a goalmouth scramble, but David Marshall made a superb stop to deny him, before tipping over Moussa Sissoko's rising strike.
Remy failed to convert another excellent chance from a Mathieu Debuchy pull-back, after a lovely pass from Cabaye. The striker's tame shot failing to test Marshall.
But the on-loan striker's next contribution was more telling. Remy received the ball from Sissoko on halfway and was given the freedom to drive forward before cutting in from the left and firing low into the bottom left-hand corner.
Cardiff could have few complaints, and the lead doubled in the 38th minute. Cabaye dissected the home defence and, after Marshall had beaten out Cisse's shot, Remy followed up to beat Ben Turner's attempted block.
It could have been 3-0 before the break. Cabaye caught Marshall out by going for goal from a wide free-kick. The shot beat the goalkeeper, but not the right-hand post.
Mackay sent on Mutch, the hero of last week's win at Fulham, at the interval in place of the ineffectual Kim Bo-kyung and the former Birmingham man instantly threaded a lovely through ball for Campbell, before teeing up Peter Whittingham to shoot just wide.
Mutch was again heavily involved when Odemwingie pulled a goal back.
Aron Gunnarsson nicked ahead of Mike Williamson and Mutch's delicate flick allowed Odemwingie to dummy the advancing Tim Krul and score his first Premier League goal for his new club.
From a position of comfort, Newcastle were suddenly rocking, and Gunnarsson narrowly failed to tap-in Campbell's ball across the box.
Marshall denied Sissoko after a rapid Newcastle counter at the other end, but a magical Mutch dribble soon had them on the back foot and Krul was forced to save from Craig Bellamy.
Cardiff were piling on the pressure and Krul had to be alert to deny Mutch after the midfielder had clipped over him.
Williamson almost turned into his own net as time ran down, but Newcastle just about clung on for a valuable win.