Paddy Brophy kicked a late winner to give Kildare a 2-19 to 2-18 win over Mayo in a terrific Allianz Football League Division 1 contest at Newbridge.

Three points each from Kevin McLoughlin and goalkeeper Rob Hennelly helped Mayo to a three-point lead, but a Tomas O'Connor goal saw the Lilywhites to a 1-11 to 0-10 half-time lead.

Jason Gibbons and Darren Coen netted for Mayo after the break, but Eoghan O’Flaherty scored a goal at the other end and the sides were level six times before Brophy’s sixth score sealed it.

Listen: Ryan pleased with win over Mayo

Mayo established an early dominance in midfield through Aidan O'Shea and Tom Parsons, but neither would make it to half-time, O'Shea dismissed on a black card and Parsons lasting just eight minutes before retiring injured.

In that initial spell, the visitors had points from Kevin McLoughlin, Adam Gallagher and O’Shea, with goalkeeper Rob Hennelly chipping in with the first of a handful of converted 45s.

Kildare looked decidedly shaky in that opening quarter, but kept in touch with scores from the impressive Paddy Brophy, Paul Cribbin and Sean Hurley.

Lilywhite wing back Cribbin picked up a black card, but the home side continued to grow into the game, with his replacement David Hyland landing an excellent score.

OShea charged through to see his shot deflected away for a '45, which Hennelly drilled between the posts, and Galagher’s second score left the Westerners three clear going into the final 10 minutes of the half.

But the game took a dramatic twist in the 30th minute when Tomas O'Connor collected Darroch Mulhall’s dropping delivery at the far post and squeezed the ball past Mayo goalkeeper Hennelly.

The home side added three further points to go four clear, and carry a 1-11 to 0-10 lead into the interval.

They stretched the advantage to six, but Mayo responded with two goals in the space of four minutes.

Jason Gibbons rifled home a spectacular goal on 39 minutes, and when Darren Coen collected Andy Moran’s cross to net from close range, suddenly the sides were level.

However Jason Ryan's Mayo side has real heart and character, and they displayed all the most admirable traits to bounce back immediately with a goal of their own, as Eoghan O’Flaherty took his chance with aplomb, beating Hennelly with an accomplished finish.

With the Leinster men back in front, the onus was on last year's beaten All-Ireland finalists to step it up again, and they did just that, with McLoughlin and Gallagher both finding the target, before substitute David Drake brought them level with a point from a difficult angle.

From there the match built to a scintillating climax, with O'Flaherty and Hugh McGrillen nudging Kildare two points clear again, only to see the advantage wiped out.

Some crazy defending gifted Mayo a free in stoppage time, from which McLoughlin claimed his eighth point and what looked certain to ensure a draw, but there was still time for Brophy to earn himself hero status as he curled over a gem from close to the sideline for a dramatic win.

Kildare: S Connolly, M O’Grady, M Foley, O Lyons, K Murnaghan, E Bolton, P Cribbin (0-01), T Moolick, G White, C McNally (0-03), E O’Flaherty (1-02), S Hurley (0-01), P Brophy (0-06), T O’Connor (1-01), D Mulhall (0-03, 2f).

Substitutes: D Hyland (0-01) for Cribbin (BC), F Conway for Lyons, H McGrillen (0-01) for Bolton, D Flynn for Moolick, M Conway for White

Mayo: R Hennelly (0-03, 3 ’45), K Keane, G Cafferkey, C Boyle, L Keegan (0-01), S McHale (0-01), B Harrison, T Parsons, A O’Shea (0-01), C Carolan, K Higgins, A Gallagher (0-03, 1f), K McLoughlin (0-08, 5f), A Moran, D Coen (1-00).

Substitutes:  J Gibbons (1-00) for Parsons, B Gallagher for O’Shea (BC), D Drake for Harrison, D O’Connor (0-01)for Coen, A Freeman for Higgins, E Varley for Gallagher

Referee: R Hickey (Clare).