We created a number of chances both before and after Dimitar Berbatov's volleyed opener at the start of the second half but it looked we might throw away a couple of points when Robert Huth smashed home the equaliser from close range with only 10 minutes remaining.
However, a hero was waiting in the wings in the shape of Robbie Keane, who came off the bench following that equaliser and took just three minutes to grab the winner, receiving a quick free-kick from Tom Huddlestone and hammering home a drive from 25 yards.
The only down side of the evening was the sight of Robbie hobbling off minutes after that goal and Didier Zokora's red card after a coming together with George Boateng sparked by a tackle on Aaron Lennon. Boateng was also sent off, both cards looked a little harsh.
"If you win a game after a defeat like that it is exactly what you have to do," said Martin afterwards. "There is no other way.
"The only thing is that we made it exciting again. I felt they came for a point, they are entitled to do that and we worked hard but we almost punished ourselves at 1-1 just before the end.
"Luckily we have the quality to pull through - that's what Berbatov did and what Robbie Keane did.
"The only thing we could do was have a good performance and win because we wanted to be in the top half of the table and we now have six home games in the next couple of weeks.
"I can understand why our fans were very disappointed after the Arsenal game and you don't want that, but we gave a good answer."
On the sending off, Martin added: "Our players know not to fight and Zokora wanted to prevent it."
Martin Jol felt the lads responded in the right way to the weekend's derby disappointments with the display and late winner against Middlesbrough.