It took Newcastle into the relative comfort of 12th place, and with 35 points they can almost start looking towards next season.

Managers towards the wrong end of the table say that back-to-back wins get teams out of trouble and Keegan has now provided that in style.

He waited two months for his first and now, like buses, two have come in quick succession.

The first came against a woeful Fulham side last week but this one, despite Spurs having little to play for, took character to come from a goal behind to turn it around and send the Newcastle fans home jubilant. “Keegan is our king,” they sang.

Keegan had never met Spurs boss Juande Ramos but there were plenty of reunions elsewhere between the two teams, with Newcastle assistant boss Chris Hughton returning to his former club and Dennis Wise in the directors’ box gesturing to his close friend Gus Poyet on the Spurs bench.

Jonathan Woodgate welcomed the Newcastle staff he worked with at St James’ Park – then almost gifted his former side a fifth-minute opener.

His careless clearance went as far as Habib Beye, who composed himself in the penalty area but cracked his finish off the crossbar.

In Newcastle’s bright opening, Paul Robinson was called into action to stop Martins’ low drive when he found a yard of room on the edge of the box.

It was an easy save from Robinson, but there was nothing straightforward about his stop to deny Barton, who angled a drive towards the bottom corner after Spurs failed to deal with a throw.

Spurs applied early pressure of their own, with Robbie Keane at the heart of their attacks. He sent Bent through but Steve Harper saved the tame shot.

Keane had a penalty shout turned down when Abdoulaye Faye climbed on him to head clear and from the corner he was almost on the goalline when he stabbed wide, following in Woodgate’s saved header.

For all of Keane’s invention, it was Bent who opened the scoring in the 26th minute.

Steed Malbranque was given time on the left flank to switch the ball to his favoured right boot, then he swung over a cross that Bent glanced into the far corner.

Keegan had just given the visiting supporters the thumbs up but threw his arms in the air in disbelief at the simplicity of the opener.

It could have been worse when Bent raced through again. He was denied by Harper rushing out and Dimitar Berbatov blasted the rebound over the crossbar.

Faye had the ball in the net for the visitors before the break but there were no protests when it was ruled out of offside. Barton felt he had a more legitimate claim for a penalty when Michael Dawson used his body to block the ball.

Newcastle’s equaliser came with seconds remaining in the first half, with Butt steering home after Geremi had pulled the ball back to the edge of the area. Their second came in the 52nd minute after Woodgate had fouled Martins on the edge of the area. Geremi’s free-kick went through the wall, leaving Robinson flat-footed. Geremi could have inflicted more damage when he raced down the right but he was stopped by Jamie O’Hara, earning the Spurs youngster a booking. The Ramos response was to bring on Aaron Lennon and Adel Taarabt, with Keane and Malbranque making way. The third, however, arrived in the 65th minute from Owen, meeting Mark Viduka’s flick with a first-time finish after Geremi played the ball into the danger zone. Martins added gloss to scoreline, with his finish delighting the travelling support.