Substitute Guy Bates scored Linfield's extra-time winner against Ballymena United in a cup-tie which saw both teams have a man sent-off.
Andrew Waterworth fired David Healy's title-chasing Blues into the lead early in the second half but Gary Thompson equalised with a close-range header.
Young Linfield striker Paul Smyth sent-off for a second yellow in extra-time.
But a diving header from Bates restored Linfield's lead before Johnny Taylor got a late straight red card.
|Like this? Read these...|
|Glenavon avoid repeat of Welders upset|
|Ports face Coleraine in sixth round|
|Photos from fifth round of the Irish Cup|
Defender Taylor put his head into opponent Ross Gaynor's midriff in an off-the-ball incident and was instantly dismissed by referee Arnold Hunter.
Smyth and Taylor will be suspended for Tuesday's night's County Antrim Shield final between the sides at Windsor Park.
Shoot-out caps Coleraine comeback
In another all-Premiership match, Coleraine went through 4-3 on penalties after a dramatic comeback against Ballinamallard United.
Coleraine looked to be heading out as they trailed the Mallards 2-0 with just six minutes left at the Ballycastle Road Showgrounds.
Ryan Campbell had shot the visitors ahead in the 16th minute and the impressive Adam Leckey added a second before the interval.
Defender Steven Douglas pulled one back by scoring his first goal since August 2013 with a 22-yard strike.
Then in stoppage-time Ruairi Harkin equalised with a spectacular long-range shot.
Coleraine scored all four of their penalties in the shoot-out while Emmett Friars shot wide and Ryan Campbell had his effort saved by home keeper Michael Doherty.
In the third tie between top flight sides, Andrew Mitchell scored two as Dungannon Swifts beat Warrenpoint Town 4-3 at Stangmore Park.
Ally Teggart and Conor Mullen got the other goals for the Swifts while Mark Hughes, Martin Murray and Johnny McMurray were on target for Town.
Cliftonville were made to fight all the way for a 2-0 victory over Amateur League side Immaculata at Solitude.
A deflected 63rd-minute shot by James Knowles, followed by a fine finish from Chris Curran, sent the senior side into the last 16.
Premiership leaders Crusaders progressed by beating Amateur League Division 1A outfit Rathfriland Rangers 3-0 at Seaview.
Jordan Owens scored his 158th goal to break Glenn Hunter's scoring record for Crusaders whose other marksmen were Diarmiud O'Carroll and Jordan Forsyth.
Mark McAllister netted a hat-trick in Portadown's 6-1 win over Wakehurst.
The other Ports scorers were Chris Casement, Tim Mouncey and Matthew Parker while Andrew Loughlin got a late consolation for the Championship Two underdogs.
Armagh City squandered a 2-0 lead at home to Portstewart before eventually going through on penalties.
Stefan Lavery's shot and a Shay Campbell header had the Holm Park men in early command.
Luke Bradley and David McClements replied for Portstewart in the second half but Jordan Bell's spot-kick completed a 4-1 shoot-out success to earn Armagh a sixth-round trip to Linfield.
|Tennents Irish Cup fifth round results|
|Banbridge Town||0-2||Carrick Rangers|
|Crumlin Star||3-2||Oxford United Stars|
|Sport & Leisure||3-2 aet||Institute|
|Armagh City||2-2 (4-1 on pens)||Portstewart|
|Coleraine||2-2 (4-3 on pens)||Ballinamallard United|
|Dungannon Swifts||4-3||Warrenpoint Town|
|Linfield||2-1 aet||Ballymena United|