Westmeath produced a dream ten minutes to knock Wexford out of the Leinster football championship and set up a provincial semi-final for themselves against Meath in two week's time.
Kieran Martin's goal on the hour mark edged Westmeath ahead following Wexford's major period of dominance that saw they turn a two-point deficit into a two-point lead with 13 minutes remaining.
But Martin hit the net following good work from John Heslin before the home side cruised to the win as the shackles came off and every point attempt flew over the black spot.
Westmeath also impressed in the early stages and had earned a 0-5 to 0-2 advantage by the 12th minute. All five points from the home side came from play with corner-forwards Martin and Shane Dempsey running riot.
But it was Wexford that took the lead in the third minute when industrious midfielder Colm Kehoe linked well with Brian Malone before pointing.
But Westmeath hit an unanswered four scores to take control. Martin landed the first off his left after god work from Darragh Daly, Dempsey fisted a secod in the sixth minute before he drilled over a sweet score from 40 metres, and Martin kicked his second following a driving run from Paddy Holloway.
Dempsey shot his third point of the half a minute later, but Westmeath missed a great goal chance in the 13th minute when Martin blazed wide, while a couple of points from Ciaran Lyng meant Wexford only trailed by a point at the end of the first quarter.
The home side had Darren Quinn to thank for his fine save which denied Ben Brosnan a certain goal after 19 minutes, and after Adrian Flynn levelled the game in the 27th minute, Westmeath missed their second good goal chance six minutes from the break when Ronan Foley's shot grazed the outside of the post.
A couple of frees from John Heslin gave Westmeath a 0-9 to 0-8 interval lead, but the loss of Ray Connellan to a black card two minutes before the break was a big blow for the home side.
Wexford were also to play without one of their standout operators when the in form Colm Kehoe followed him to the line for an off the ball offence that drew a black card from the referee.
Westmeath looked to have taken a significant step towards victory when sub John Connellan, Daragh Daly and Dempsey all kicked scores for the home side in the early minutes of the half, but Wexford went on to take over completely.
They kicked six of the next seven points as the home side appeared to fade playing into the wind and after a further setback with a black card for full-back Kevin Maguire, Westmeath looked dead on their feet.
But the game turned on its head ten minutes form time when John Heslin robbed Wexford of possession and the ball eventually found its way to Martin who finished well to the net.
Westmeath followed that goal with five points on the spin to end any hopes of a Wexford comeback, to set up a Leinster semi-final with Meath in a fortnight.
Teams and scorers:
Scorers for Westmeath: K Martin 1-2, J Heslin 0-5, (0-4f), S Dempsey 0-4, J Connellan, G Egan & D Glennon 0-2 each, D Daly, J Dolan, J Gilligan & P Sharry 0-1 each
Scorers for Wexford: C Lyng 0-8 (0-6f), A Flynn & K O’Grady 0-2 each, C Kehoe, J Wadding, B Brosnan (f) 0-1 each.
Westmeath: D Quinn; K Daly, K Maguire (J Donohoe 55 BC), P Holloway; P Sharry, J Gilligan (F Boyle 71), J Dolan; G Egan, D Daly (D Glennon 50); R Foley (L Smyth 46), R Connellan (J Connellan 33BC), D Corroon; K Martin (D Lynch 68), J Heslin, S Dempsey.
Wexford: S Roche; J Wadding, N Rossiter, M Furlong (R Tierney 16); B Malone, S Donohoe, A Flynn (G Molloy 60); S Byrne, C Kehoe (P Byrne 40 BC); K Butler, B Brosnan, T Rossiter (M O’Regan 52); E Nolan (J Tubritt 47), C Lyng, K O'Grady.
Referee: Fergal Kelly (Longford)