Sheffield Wednesday's 10 men held on for a 2-1 victory against plucky Rochdale at Spotland to reach the fifth round of the FA Cup.
But it was a nervy finish for the sky Bet Championship side, reduced to 10 men after Joe Mattock was dismissed for a second bookable offence.
Mattock had nudged the Owls ahead early in the second half and the tie looked in hand when defender Oguchi Onyewu doubled the lead minutes later.
But a stunning strike from Michael Rose brought Rochdale back into the contest and when Mattock was sent off it was backs to the wall defending for Stuart Gray's men.
The home side created the first real opening of the game in the 18th minute when Rose's cross towards the back post picked out Peter Vincenti and he got above Onyewu only to send his header across the face of goal and wide.
The visitors had another escape when Matt Done broke forward and, after a neat exchange with Ian Henderson, advanced into the area unchecked.
Owls goalkeeper Damien Martinez was quickly off his line and diverted Done's shot to safety.
The visitors finished the half strongly as Mattock fed Chris Maguire in the area and his angled drive was blocked by Jack O'Connell.
From the resulting corner Onyewu's header was blocked on line by a combination of Josh Lillis and Done.
And before the half was over, Jacques Maghoma was through on goal in a central position but his finish lacked conviction and Lillis was able to preserve Dale's clean sheet going into the break.
Wednesday's growing momentum continued after the break and the visitors edged ahead in the 51st minute.
An inswinging corner from the right by Maguire was glanced towards goal by the dominant figure of Glenn Loovens and Mattock was on the line to force the ball home.
Wednesday followed up with a second six minutes later, again from a corner.
This time, Mattock's delivery from the left was headed on target by Onyewu and although the Dale defence blocked his initial effort, the Owls defender smashed the loose ball through a crowded six-yard area and into the net.
Rochdale responded positively. Henderson's curling effort had Martinez back peddling to push the goalbound effort over the bar and from the resulting corner Dale pulled a goal back.
Henderson's delivery was headed out of the area but fell invitingly for Rose, who sent a tremendous 25-yard strike into the top corner of Martinez's net.
The visitors were reduced to 10 men soon after when Mattock chopped down Henderson, receiving his second booking of the day.
Martinez then produced another acrobatic stop to prevent Rose's free-kick compounding the misery of Mattock's dismissal.
Despite their depleted ranks, Wednesday defended well to shut the home side out and could have scored a third themselves when substitute Giles Coke broke through late on, Lillis denying him.