A point from substitute Bernard Allen proved to be the difference as Offaly defeated neighbours Longford to advance to the quarter-finals of the Leinster Championship.

Longford will be disappointed with the way they gave the ball away cheaply on numerous occasions. Offaly turned over the ball 12 times in the second half alone when Longford were in possession.

In a game that had some superb scores, good play and mistakes, the sides were level five times. Longford had chances near the end to bring the game to extra-time but Offaly held firm.

Despite playing against a strong wind in the opening half the Faithful County made a great start to the game. Jamie Evans got their first point in the fourth minute. Two minutes later Ruairi McNamee passed to Peter Cunningham who fired an excellent shot to the net.

Darren Gallagher pointed a free in the 13th minute for Longford's first score. That was cancelled out by a Cian Farrell point. Then Longford took control of the game with Gallagher kicking over two fantastic points. Joseph Hagan hit over an excellent score to level matters in the 24th minute. Two points from Hagan and Dylan Farrell gave Longford a two-point lead in the 28th minute.

Offaly were level going in at the break with Nigel Dunne kicking over a fine effort followed by a McNamee point to leave the score 1-04 to 0-07.

Offaly goalkeeper Ian Duffy secures possession as Daire O'Brien of Longford and Declan Hogan grapple

Just like the first half Offaly started the second half well and opened up a two-point lead in the 41st minute. Longford turned the game in their advantage in the 43rd minute when the superb Gallagher fisted the ball to the net; it was a move that he had started by winning possession in the middle of the park.

Offaly though were level again on 49 minutes when Cian Farrell hit over a mark. It really was end-to-end stuff. The lead changed twice in the space of one minute before another Hagan point drew the sides level for a fifth time in the 65th minute.

Cunningham and Allen edged Offaly ahead by two in the 69th minute. Longford's Andrew Farrell fisted his effort wide in stoppage time. Iarla O’Sullivan cut the gap to one in the third minute of stoppage time. Longford couldn’t get an equaliser as Offaly held on for a meeting with Meath.

Offaly: I Duffy; C Donnelly, D Hogan, D Dempsey; R Egan, P Cunningham (1-01), L Pearson (0-01); J McEvoy, C McNamee; C Farrell (0-03,1m), R McNamee (0-01), A Sullivan; D Hyland (0-01,1f), N Dunne (0-02,1f), J Evans (0-02)

Subs: Subs: B Allen (0-01) for Evans (47), J Maher for Dunne (59), B Carroll for Hyland (60), C Donohoe for Donnelly (70+2), J for R McNamee (70+4)

Longford: P Collum, P Fox, A Farrell, B Masterson; I O'Sullivan (0-01), M Quinn (0-01), R Moffett; J Macken, D Gallagher (1-04,2fs); K McGann, J Hagan (0-03), Dessie Reynolds (0-01); D Mimnagh, D O’Brien, D Farrell (0-01)

Subs: O Kenny for McGann and A Farrell for O’Brien (ht), T McNevin for Macken (47), L Connerton for Mimnagh (52), D Doherty for Kenny (65)

Referee: S Hurson (Tyrone)