Offaly made it through to the Leinster SHC semi-finals, but lived dangerously in the face of a spirited Wexford fightback at O'Connor Park, before they survived on a 2-12 to 1-13 scoreline.
The Faithful led by nine points at one stage, but were left hanging on by their fingertips at the end.
Shane Dooley's 1-8 tally and a Joe Bergin goal broke the hearts of a brave Wexford outfit that looked capable of completing a sensational revival, but fell just short at the end.
Jack Guiney shot Wexford into a four points lead, but Offaly rallied in the second quarter, and a 1-4 salvo, including a 33rd minute goal, from Shane Dooley, sent Offaly in with a 1-8 to 0-8 interval lead.
Joe Bergin netted a second goal, and while Jack Guiney pulled back a Wexford goal from a free, time ran out for Liam Dunne's side, who had cut a nine points deficit back to two.
Earlier, at the same venue, rampant Dublin brushed aside a weak Laois challenge with a 3-23 to 1-7 win to set up a Leinster SHC semi-final clash with Kilkenny.
Two superb Liam Rushe goals in the first half set the tone, and 22 points separated the sides at the end of a one-sided contest which bore more resemblance to a challenge game than a championship tie.
Neil Foyle scrambled a Laois goal, but it was the Dubs who led by 3-14 to 1-1 at half-time.
They went through the motions in the second half, with Paul Ryan completing a nine points tally.