Sligo have booked their place in the third round of the All-Ireland SFC qualifiers, winning their north-west duel with Leitrim by 1-07 to 0-09.
A 12th-minute goal from David Kelly, which saw Sean Davey break an Eamon O'Hara ball down for the young corner-forward, proved crucial as the Yeats men grabbed their 18th win in 30 championship meetings with their neighbours.
Sligo led 1-02 to 0-03 after a disappointing first half at Carrick-on-Shannon.
Poor shooting blighted the game but Leitrim hit three of the closing four points – Gavin McWeeney, James Glancy and Dermot Reynolds were on target – to almost send the game into extra-time.
Whichever side won today's tie at Páirc Seán Mac Diarmada was going to create history - Leitrim were gunning for their first ever qualifier win, while the visitors had not won at a Leitrim venue in 32 years.
Donal Brennan opened the scoring for Leitrim with a well-taken point, but that was immediately followed by Kelly's goal. A lengthy free from O'Hara was swooped on by Davey and he broke the ball into the path of the Tubbercurry teenager who swung a shot high to Cathal McCrann's net.
A series of wides followed but points from Davey and John McPartland, both superb scores, pushed Sligo 1-02 to 0-01 clear. However, Ciaran Duignan and Brennan raised late white flags for the hosts who trailed by just two points at the break.
Dessie Dolan snr's side sensed an upset and gradually got on top in the early stages of the second half. Gary McCloskey and Chris Carroll had a purple patch in midfield as Duignan angled over a free and Colm Regan sent in a towering point to level at 1-02 to 0-05.
Sligo though kept ahead with points from Mark Breheny and substitute Kenneth Sweeney sandwiching a lovely score from Leitrim full-back John McKeon, set up by Barry Prior.
Wing-forward Prior was left to rue a missed goal chance, 20 minutes into the second half, when Sligo 'keeper Philip Greene beat out his shot from point-blank range. A Breheny free followed and Sligo looked set to coast home.
Davey took his tally to two but Leitrim substitutes Glancy and McWeeney and captain Reynolds combined to set up a furious finish as all three pointed in the final eight minutes of normal time. Sligo's sole reply came from wing-back Karol O'Neill.
Unfortunately Leitrim could not find the levelling point in injury-time - Sligo's defence, marshalled superbly by skipper and full-back Noel McGuire, held out as the visitors advanced to a third round meeting with Westmeath.
Leitrim: C McCrann; D Reynolds (capt), J McKeon, M McGuinness; F Holohan, B McWeeney, S Foley; G McCloskey, C Carroll; B Prior, M Foley, C Regan; D Brennan, D Maxwell, C Duignan.
Sligo: P Greene; C Harrison, M McGuire (capt), R Donovan; P McGovern, B Egan, K O’Neill; E O'Hara, T Taylor; J McPartland, M Breheny, P Doohan; D Kelly, S Davey, A Marren.
Referee: Colm Broderick (Down)