Coleraine needed a 93rd minute winner from Ian Parkhill to finally see off a dogged Ballyclare Comrades side.
The Ballymoney man came off the bench to fire the Bannsiders into the second round of the League Cup. They were made to fight all the way by Stephen Hughes side who looked impressive for large parts of the game.
The visitors made an assured start at The Showgrounds, and deservedly edged in front on 18 minutes as Gary Donnelly finished at the second attempt.
The Comrades had two chances inside a minute to double their lead before the half hour as Jamie Willighan had a shot saved, before Gareth McConaghie made a last ditch tackle to deny Thomas Robinson.
The Bannsiders drew level on 28 minutes as Kyle Rowe somehow let Jamie McGonigle’s effort slip through his hands.
He almost put his side in front a minute later as Brad Lyons sent him clear, but his shot fizzed past the far upright.
Stephen O’Donnell drew a good save out of Rowe on 51 minutes as he got on the end of Harkin’s corner.
A superb weaving run from McCauley on 64 minutes saw him surge into the Comrades box, but his shot curled wide of the post.
Back came the visitors as Dean Youle had a header cleared off the line by Carson.
Substitute Eoin Bradley spurned a great opportunity on 72 minutes as McGonigle picked him out in the box.
Two minutes later McCauley headed over Carson’s deep cross as Coleraine pressed for a winner.
Bradley then wasted two one-on-one opportunities after twice being put through on the Comrades goal as the game entered the closing stages.
Lyons then followed Bradley’s lead as he shot straight at Rowe minutes later.
Just as the game seemed to be heading to extra time up popped Parkhill to send Coleraine through.
He took a pass from McGonigle before curling a delightful effort past Rowe from the edge of the box.