Middlesbrough recovered from a shaky start to seal an FA Cup semi-final clash against West Ham United later this month after beating Charlton Athletic 4-2 at the Riverside Stadium.
Boro's defence started the sixth round replay poorly and the Addicks should have taken the lead after only five minutes.
Dennis Rommedahl's cross caused panic in the Boro defence but an unmarked Bryan Hughes missed his header and Darren Bent was unable to force the ball home from close range.
Against the run of play Boro took the lead six minutes later. Fabio Rochemback's long-range free-kick wasn't particularly well-struck but it went through the Charlton wall and deceived Thomas Myhre before nestling in the back of the net.
However, the home fans barely had time to celebrate as the visitors equalised immediately. Shaun Bartlett headed Jonathan Spector's long throw on to the unmarked Hughes who guided his shot home.
It was almost two goals inside 60 seconds for the Addicks as, straight from the kick-off, Bent found himself free inside the area but Mark Schwarzer's one-handed save denied the England striker.
Steve McClaren's side weathered the storm though, and slowly began to get on top. George Boateng sliced a sot horribly wide after Rochemback had pulled a free-kick back to him, before Mark Viduka tried to catch Myhre out with a looping 40-yard shot but the Charlton keeper was wise to the opportunistic effort and saved easily.
However, Boro did take the lead in the 26th minute after some horrible Charlton defending. Hermann Hreidarsson failed to clear a bobbling ball and a gleeful James Morrison fired a shot beneath Myhre.
The goal gave Boro renewed confidence and they took full control of the game until half-time. Jimmy Floyd Hasselbaink almost made it 3-1 with a clever header that was expertly turned away for a corner by the busy Myhre and just before the break Viduka's stinging, low drive curled just wide with the Charlton keeper beaten.
The second half appeared to be meandering towards a straightforward Boro win until three goals in four minutes late on enlivened proceedings.
Three minutes into the second half Hasselbaink held off the challenge of Chris Perry and got in a rasping drive that Myhre clung on to but Boro appeared content to settle for a narrow win against a Charlton side whose goalscoring problems were there for everyone to see.
However, with 17 minutes left Morrison set up Hasselbaink on the edge of the area and the deadly Dutchman drilled his shot home.
Charlton hit back again though and Rommedahl's curling free-kick caused panic in the Boro defence as the ball eventually ricocheted off Gareth Southgate and into the net.
There was little time for the visiting fans to contemplate extra-time though as the outstanding Viduka danced his way into the penalty area before unleashing a fierce shot that gave Myhre no chance.
Boro played the better football and deserved their victory as they reached their second semi-final of the season, following their amazing UEFA Cup victory against FC Basel last week.