Kildare kept their Allianz Football League Division 2 survival hopes alive with a four-point victory over Cavan in Newbridge.
A goal halfway through the second half from Fergal Conway looked to have Kildare home and hosed as they moved 10 points clear, but they had to hold off a fierce Cavan rally to claim the points.
A first half missed penalty also proved crucial for the Breffni Blues, with Mark Donnellan stopping a Martin Reilly effort that proved crucial on the end result.
Kildare now sit outside the bottom two but themselves and Cavan could still go down come the conclusion of the division next Saturday afternoon.
In an incredibly open half of football, where both sides attacked at will, Kildare kicked the opening three points with Jimmy Hyland and Ben McCormack adding on scores to give the home side an early advantage.
Cavan replied with a Conor Smith score before the teams swapped points to leave Kildare ahead on a 0-06 to 0-03 scoreline at the 15-minute mark of the half.
Cavan then got a bit of momentum going and points from Smith, Cormac O'Reilly and Gearoid McKiernan left the sides deadlocked.
Kildare and Cavan both continued to go point for point until a quickfire couple of scores from Darragh Kirwan, Jimmy Hyland and Kevin Flynn left the Lillywhites three points to the good.
After Chris Conroy knocked over a free for the Ulster side Kildare hit back via Hyland and Paul Cribbin and while four points separated the sides at that stage, Cavan were awarded a penalty in the 33rd minute when David Hyland committed a foul on Padraig Faulkner in the square.
The experienced Martin Reilly stood up to take the spot kick but Kildare goalkeeper Mark Donnellan produced a fantastic save that resulted in a 0-13 to 0-09 lead at the interval.
Points from Kirwan, Hyland and Kevin Flynn quickly added to that Kildare buffer on the scoreboard in the early minutes of the second period.
Chris Conroy replied with a brace of frees but a goal from sub Fergal Conway looked to have settled the win for Kildare and that looked even more likely when Flynn and Hyland knocked over further points.
Cavan finished the contest very strongly though with Conroy, McKiernan and Caoimhin McGovern all scoring to reduce the gap to four points.
Jack O'Connor’s Kildare team looked like they were about to throw away a huge lead when gifting Cavan a late goal chance but after a last gasp pass went astray that threat was avoided.
Kirwan, Feely and Hyland then knocked over insurance scores as Kildare came out on top.
Kildare: Mark Donnellan; Shea Ryan, Mick O’Grady, Eoin Doyle, David Hyland, Con Kavanagh, Kevin Flynn 0-03, Kevin Feely 0-01, Aaron Masterson, Paul Cribbin 0-01, Paddy Brophy, Liam Power 0-01, Ben McCormack 0-02, Darragh Kirwan 0-04, Jimmy Hyland 0-09 (5f, mark).
Subs: Fergal Conway (1-00) for Power 46 mins, Neil Flynn for P.Cribbin 58 mins, Keith Cribbin for Kavanagh 60 mins, Eanna O’Connor for Brophy 63 mins, Tommy Moolick for Kirwan 68 mins.
Cavan: Raymond Galligan; Jason McLoughlin, Killian Brady, Cormac O’Reilly 0-01, Gerrard Smith, Chris Conroy 0-07 (6fs), Ciaran Brady, Gearoid McKiernan 0-05 (2f), Padraig Faulkner, Oisin Kiernan 0-02 (1f), Martin Reilly, Oisin Brady, Conor Smith 0-02, Cormac Timoney 0-01 (mark), Evan Doughty.
Subs: Conor Madden for Doughty 43 mins, Luke Fortune for O.Brady 45 mins, Caoimhin McGovern (0-02) for M.Reilly 53 mins, Bryan Magee for C.Smith 58 mins, Niall Murray for O’Reilly 71 mins.
Referee: Cormac Reilly (Meath)