Offaly netted deep into injury time to beat Antrim 2-19 to 1-20 in Sunday's All-Ireland SHC round one qualifier.
The Saffrons led 0-13 to 0-10 at the break in Ballycastle but David Kenny's goal edged the visitors ahead.
A Neil McManus free brought the teams level before Antrim took command, with a superb goal from PJ O'Connell putting Antrim four points ahead.
Offaly reduced the gap before Dan Currams flicked into the Saffrons net with just seconds remaining.
Antrim should have been further clear at the break but Ciaran Clarke hit a post when clear through and O'Connell also wasted a goal chance.
Paul Shiels fired over six points for the Ulster side in the first half and they moved four ahead on the restart.
Offaly halved the deficit before Kenny hit the opening goal to give the Leinster men the lead.
Antrim made a strong response, seizing control of the match and they looked to be on course for victory when O'Connell's fine strike found the Offaly net.
However, Antrim let Offaly back in the game in the closing stages and the visitors were within two points going into two minutes of added time.
A long free was sent forward with 30 seconds left and Currams got the final touch to score the decisive goal, with Offaly tagging on an insurance point before the final whistle.
Antrim may be out of the All-Ireland series but they still have the Ulster hurling championship final to look forward too.
Down and Derry met in Sunday's semi-final at Clones, which will go to a replay following a 3-23 to 4-20 draw after extra-time.