David Scullion snatched a late winner for Coleraine in the big Irish Cup derby clash at Ballymena Showgrounds.
The Bannsiders had to battle back after Ballymena took an early lead through a long-range Gavin Taggart shot which caught out keeper Michael Doherty.
Curtis Allen headed in his 15th goal of the season to equalise and Coleraine then went in front through a Shaun Maher own goal.
Gary Liggett got Ballymena level at 2-2 but soon after that Scullion pounced.
Liggett's first goal for the Sky Blues since his move from Lisburn Distillery was a back post header from a cross sent in by substitute Neil Lowry.
It looked as though that had earned Glenn Ferguson's men a replay but Coleraine grabbed a dramatic winner.
The ball was played back into the danger area after a Ruairi Harkin corner and Scullion got the final touch for his fourth goal of the season.
In the other all-Premiership games, Cliftonville beat Donegal Celtic 2-0 and Crusaders had a 4-1 home success over Glenavon.
Cliftonville left it late against DC with Gormley lobbing the breakthrough goal in the 79th minute.
Then, when Gormley was brought down by keeper Niall Murphy, Reds skipper George McMullan made it two from the penalty.
Winger Paul Heatley scored a hat-trick in 12 first-half minutes as Crusaders romped home 4-1 against Glenavon.
Timmy Adamson had put the Crues into an early lead and Matthew Rooney got Glenavon's goal just before half-time.
Irish Cup sixth round
Ballymena United 2-3 Coleraine
Crusaders 4-1 Glenavon
Cliftonville 2-0 Donegal Celtic
Portadown 1-0 Ards
Institute 0-2 Kilmore Rec
Bangor 2-5 Glentoran
Lurgan Celtic 0-3 Knockbreda