Substitute David Scullion scored in the third minute of first-half injury-time to give Coleraine a first-leg lead over Shamrock Rovers in the Setanta Sports Cup first round.
Karl Sheppard headed wide for Rovers before Scullion brilliantly chipped the ball over goalkeeper Barry Murphy, the ball going into the net off the bar.
For Scullion, it was his first touch of the game.
Rovers piled on the pressure after the break but Coleraine defended well.
"We tried to rotate things a wee bit but when Ruairi Harkin got injured, David came on and showed his class - it was a quality finish," said Coleraine manager Oran Kearney.
"They had a lot of possession but we were really well organised and the players came of age tonight.
"They have an unbelievable amount of quality throughout their side and we are under no illusions about the task that lies ahead of us in the second leg.
"We have played better in our last two games, but we knew that we hadn't become a bad side overnight."
The sides meet again at Ballycastle Road next Monday.