Ireland, inspired by Jacob Stockdale and Jack Carty, bounced back in their Rugby World Cup preparations to end Wales' dominant run of home victories and ruin Warren Gatland's Cardiff farewell with a 22-17 warm-up win Saturday.
Gatland, stepping down after the World Cup in Japan following 12 years as Wales coach, opted to field a reserve side against an equally experimental Irish lineup in his last home game in charge.
But he left the Principality Stadium wondering what could have been as Ireland's fringe players gelled immediately -- with Carty excelling in his first international start -- while Wales struggled for fluency and accuracy early on and fell short despite a superb late fightback.
Stockdale, brilliantly set up by fellow winger Andrew Conway, crossed in the left corner after 18 minutes and then pounced on a Welsh handling error and dashed over again 10 minutes later.
The home side, losing 22-3 with 20 minutes left, scored two late tries, but could not bring about a fairytale ending for Gatland or preserve their impressive run in Wales, having last suffered a home defeat in November 2017, when they were defeated by New Zealand.
The result also saw Wales lose their short-lived status as the world's top-ranked side.
Ireland, who saw off Italy in their opening World Cup warm-up Test before being shocked 57-15 by England at Twickenham last week, made 11 changes Friday, while Wales made 14.
While Friday's encounter was essentially a reserve match, it was hugely important for players on both sides hoping to book a late seat to Japan.
Fly-half Carty, celebrating his 27th birthday, was a big individual winner. With Ireland's first-choice fly-half Johnny Sexton and understudy Joey Carbery making their way back from injury, this was Carty's chance to impress and he did that superbly, running the show from the first whistle.
Wales' No 10. Rhys Patchell was also hugely impressive after replacing Jarrod Evans at half-time, making a strong case to be selected as back-up for first-choice Dan Biggar.
Patchell almost produced the perfect finale when, in the 76th minute, he received the ball following a series of Welsh forward drives and sidestepped over, adding the conversion to bring them within five points before Ireland closed out the game.
The two sides meet again next week in Ireland in the second of their back-to-back encounters, wrapping up their preparations for the World Cup, which starts on Sept. 20.