First-half goals from Steve Morison and Liam Trotter fired Millwall into the Carling Cup Third Round draw at the expense of Middlesbrough.
But the victory was far more convincing than the scoreline suggests, with Scott McDonald's 88th-minute chip deceiving keeper David Forde to set up a frantic finale that had never really looked likely.
Lions boss Kenny Jackett had been looking for a response from his players following Saturday's defeat at Leeds United, and he was satisfied with the night's work.
"I was pleased with the win," said Kenny.
"Boro have invested in their squad adding some quality players and you could see that by the way they moved the ball around.
We had to be on top of our game and I'm pleased that tonight we were."
After a quiet opening in which the only noteworthy action was a 30-yarder from Boro's Tarmo Kink that whistled over, The Lions slowly and steadily worked their way into the match and a perfect forward pass by Trotter saw James Henry outpace Matthew Kilgallon and hit a low shot that was held by Jason Steele in the visiting goal.
Alan Dunne sent a fierce drive over from the edge of the area and skipper Paul Robinson was left ruing a good chance to break the deadlock on 27 minutes, evading his marker to meet Henry's inswinging corner. Unfortunately Robbo planted his header over the bar from six yards.
But The Lions didn't have to wait long for the opening goal. Alan Dunne steamed into the area after a sublime flick from Jimmy Abdou and was sent tumbling by Kink.
Referee Graham Horwood took the advice of his linesman, who was well placed to see the incident, and up stepped Morison to crash home an unstoppable penalty into the top left hand corner.
Kink twice then tried to atone for his mistake, letting fly with a left-footed effort that bounced a yard wide and then seeing a 31st-minute strike pushed round the post by keeper Forde.
But it was Millwall who showed how it should be done on 39 minutes. Another corner from Henry was headed back by Morison, Boro failed to clear the danger and there was Trotter to thrash home his second goal of the campaign - doubling his tally from last season already!
It could have been 3-0 just before the break when Forde's flat forward kick picked out Henry on the right. The former Reading man showed Kilgallon a clean pair of heels and whipped in a low cross, but Stephen McManus was on hand to clear from Henry's intended target of Neil Harris.
Millwall started the second half brightly and Morison, who was a real handful for the Boro defence all night, saw a 49th-minute shot flash across the face of goal before setting up Henry, whose low drive was held by Steele.
At the other end a rasping drive from Julio Arca rattled the crossbar just past the hour mark with manager Gordon Strachan then introducing the prolific Kris Boyd and Andy Halliday in a bid to spark his side into life.
Boro winger Kink was lucky to escape with just a yellow card on 69 minutes following an off-the-ball altercation with Henry that surprisingly saw The Lions man also enter referee Horwood's book.
Jackett introduced Darren Carter and Kevin Lisbie and it was from Lisbie's flick-on that Morison hit a stupendous 86th-minute shot that Steele somehow got a fingertip to.
If Morison's shot packed a punch, Boro's late goal was a surreptitious sucker punch, with McDonald's chip from the edge of the area bamboozling everyone, not least poor keeper Forde, who seemed stunned when he realised the Boro man's effort had dropped behind him rather than over the bar.
Although McDonald's shot gave Boro a glimmer of hope, an equalising goal would have been a travesty of justice and The Lions came through an unecessarily anxious final few minutes to secure a place in Saturday's Third Round draw.
Millwall: Forde, Dunne, Barron, Abdou, Robinson, Ward, Schofield (Carter, 74mins), Trotter, Harris (Lisbie, 75mins), Morison, Henry. Subs not used: Mildenhall, Hackett, Mkandawire, Smith, Marquis.
Booking: Henry (69mins)
Scorers: Morison (28mins, pen), Trotter (39mins)
Middlesbrough: Steele, Wheater, Kilgallon (Halliday, 64mins), Hoyte, McManus, Kink, Arca, Bailey, Robson, Lita (Boyd, 64mins), McDonald. Subs not used: Coyne, Miller, Bennett, Williams, Pilatos.
Booking: Kink (69mins)
Scorer: McDonald (88mins)
Att: 6,704 (away 479)