A DREAM debut for Louth matchwinner Daniel O'Connor but a nightmare scenario for Westmeath on a dramatic afternoon in Navan.
The Wee County left it late, but it was they who booked a date with Dublin on Sunday week after a hectic eight and a half minutes of injury-time.
They trailed by two points going into that period, and survived a Callum McCormack piledriver coming back off the bar a minute in.
But Ronan Carroll roamed forward in the 76th minute and managed to get the ball to O'Connor, a second-half sub who had never played senior football for his county before yesterday, and he did the rest. He will score better goals than his scuffed finish, but rarely will they be more important.
Westmeath had a chance to take it to a replay when John Heslin earned himself a free, but his effort from just inside the 45-metre line, dead in front of goal, drifted wide and with it went his side's chance.
Westmeath deserved so much more, having dominated the second half. When they review the video, Pat Flanagan and his management team will rue their forwards' profligacy and hesitancy in front of goal.
The starting forward-line only contributed 0-4 of their total and they were too reliant on Heslin, who had a mixed day when shooting.
Louth, meanwhile, have 13 days to fix the problems that saw them re-emerge for the second half a shadow of their former selves before facing the Dubs.
Peter Fitzpatrick's men led by two after a free-running, energetic first period but it took them 36 minutes to get a point from play after half-time.
"A game is not over until the final whistle goes," the relieved manager said. "We have learned that the very hard way in the past number of years.
"In 2010 we lost the Leinster final, in 2011 and 2012 we lost O'Byrne Cup finals and other games, but every game goes on until the final whistle. This Louth team has done very, very well.
"Westmeath were hungry and in the second half they dominated the first 25 minutes. We were non-existent then, but the commitment I am getting from this Louth team is second to none. They have trained very hard and have put the commitment in."
While the second half didn't go to plan, there was much to build on from the first half where Westmeath started better but when Louth got to the pace of the game, they caught up and surpassed their opponents.
Heslin was prominent early on and scored three points as they led by 0-4 to 0-2. But the men in red got their runners going and pegged it back before Ray Finnegan capped a brilliant end-to-end move to put his side ahead.
Kieran Martin equalised, but after both Louth's Mark Brennan shot just wide and Westmeath's Ger Egan was denied by first Neil Gallagher and then Jamie Carr -- it was Carroll and Louth who lifted the first green flag, with the midfielder taking Brennan's pass and beating Gary Connaughton with an emphatic finish.
The Westmeath captain then brilliantly tipped Derek Crilly's goalbound effort over as Daniel McDermott and Paul Sharry's points sandwiched Darren Clarke's free to keep their side two points behind at the interval.
Both sides were unrecognisable after the interval, with Sharry and Heslin driving Westmeath on. They led after 15 minutes of the half after the duo had pointed along with Paul Bannon and David Glennon, while James Dolan extended the lead.
Clarke replied with two frees, before Gerard Hoey's overzealous tackle on David Glennon went unpunished, but saw the full-forward taken to hospital in a neck brace and resulted in an extended extra-time.
McCormack smashed his effort off the bar, before nailing a point. Carroll swapped efforts with Heslin before -- as the clock ran to 76 minutes -- he bundled the ball to O'Connor for his Hollywood moment.
"The stuff of dreams," the debutant -- who was called up after the squad was hit by a raft of emigrations -- said with a smile. "We mightn't have deserved to win it but it's the never-say-die attitude that we've spoken about the last few weeks in training. It doesn't matter how much we win by once we get there in the end.
For Flanagan, there was only regret.
"We more than held our own," he said. "It is a pity for these players who have worked so hard to come together as a new team, they could have done with a win and they would have deserved it."
SCORERS -- Louth: R Carroll 1-2, D O'Connor 1-0, D Clarke (1f) 0-3, D Crilly 0-2, R Finnegan, J Carr 0-1 each; Westmeath: J Heslin (2f) 0-5, P Sharry (1 '45') 0-2, K Martin, G Egan, D McDermott, David Glennon, C McCormack, P Bannon, J Dolan 0-1 each.
LOUTH -- N Gallagher 6; P Rath 6, L Shevlin 6, G Hoey 6; R Finnegan 8, J Carr 6, D Byrne 7; P Keenan 6, R Carroll 8; D Crilly 7, M Brennan 5, A Reid 6; D Maguire 6, J McEneaney 5, D Clarke 6. Subs: A McDonnell 6 for Maguire (45), D O'Connor 7 for Brennan (47), R Greene 6 for Shevlin (52), C Rafferty 6 for Byrne (58), JP Rooney 6 for Crilly (67).
WESTMEATH -- G Connaughton 7; M Curley 5, J Gaffey 5, K Maguire 6; D Harte 6, P Sharry 8, D McDermott 6; J Heslin 8, P Bannon 7; K Martin 6, G Egan 5, J Dolan 6; Denis Glennon 5, David Glennon 5, M Ennis 6. Subs: C McCormack 7 for Ennis (51), R Foley 6 for David Glennon (66), A Giles for McDermott (77).
REF -- M Higgins (Fermanagh).