Ireland are back in contention at the Junior World Championship in New Zealand following a bonus point win over Wales, last year's runners-up.
After losing 19-13 to France a week earlier this was a huge scalp for Ireland, who had loose-head Peter Dooley and left wing Alex Wootton were yellow-carded either side of the break, to take.
Ireland had not beaten Wales at this level since February 2004 when the under-21s won 30-19 in Galway and the Class of 2014 will take heart from the fact that the Irish scorers on that occasion included Tommy Bowe and Jamie Heaslip, who have gone on to play at the highest level.
Mike Ruddock's men made a perfect start with tries from Rory Burke and Garry Ringrose in the first 11 minutes. Ross Byrne converted both to put Ireland 14-0 up.
A Tyler Morgan score, to which Angus O'Brien added the extras, halved Ireland's lead, but Byrne replied with a penalty to open up a 10-point gap.
O'Brien converted a penalty with the last kick of the half to leave it 17-14 at the break.
Dooley was already in the sin-bin when Wootton joined him shortly after the resumption and against 13 men Wales tightened the scrum-time screw with No. 8 James Benjamin diving over. with O'Brien converting to give Wales a 21-17 lead.
Ireland scored 18 in the last 30 minutes with Ringrose and Cian Kelleher adding tries and Byrne posting eight more points via a conversion and two penalties.
Ireland are second in the pool with six points and in with a real chance of making the semi-finals before they face Fiji on Tuesday.
IRELAND UNDER-20: Kelleher (Leinster); Gaffney (Connacht), Ringrose (Leinster), Goggin (Munster), Wootton (Munster); Byrne (Leinster), McCarthy (Leinster); Dooley (Leinster), Abbott (Munster), Burke (Munster), Moloney (Munster), Molony (Leinster); Timmins (Leinster), Taggart (Ulster), O' Donoghue (Munster, capt). Replacements: Donnellan (Leinster), Coulson (Leinster), Heffernan (Leinster), Murphy (Leinster), Dee (Munster), Foley (Munster), McKeon (Leinster), Brewer (Leinster).