Kildare just about qualified for a place in the Division Two semi-finals at the end of a tense encounter with Longford at Newbridge.
The Lilywhites were the dominant side for most of the game but this doesn't disguise the fact that Longford put in a very credible performance. Kildare raced into an early lead and for long periods in the opening half appeared destined for an easy win.
Padraig Brennan, the game's top scorer with nine points, put them into the lead with a converted free in the second minute and midfielder Dermot Earley extended this three minutes later.
Longford fell five points in arrears before they opened their account. An incisive run by Paul Barden found corner forward Padraig Davis, who fired to the net from Barden's pass.
However it failed to inspire a Longford rally and Kildare went on to lead 0-14 to 1-3 at halftime. Kildare full back Anthony Rainbow was dismissed shortly before half time following an incident with Niall Sheridan and the visitors used the extra player to full advantage.
They got off to an ideal start when Paul Barden fired home from the penalty spot. Enda Barden hit the equalising point in the 49th minute but as soon as he did Brennan pushed Kildare into the lead again.
Longford levelled again from a free by Enda Barden but Tadgh Fennin lifted the siege by firing low to the net in the 61st.
KILDARE: C Byrne; B Lacey, A Rainbow, J Bracken; K Duane, K Doyle, M Ryan; G Ware, D Earley (0-1); P Murray (0-1), J Doyle (0-2), J Reilly (0-3); P Brennan (0-9, 6 frees), B Murphy, T Fennin (1-1). Subs: D Hughes for Murray, M Wright for Bracken, R Sweeney for Ware.
LONGFORD: G Tonra; B Burke, D Ledwith, E Ledwith; M Mulleady, D Blessington, P Ross; D Hanniffy, E Barden (0-6, 2 frees); T Smullen, P Barden (1-1, pen), D Barden; J Martin (0-2, 2 frees), N Sheridan, P Davis (1-3, 3 frees). Subs: C Sheridan for P Barden, C Hanniffy for E Ledwith.
Referee: M McBrien (Fermanagh).