Ireland U-15s came from behind three times in normal time to set up penalties and after Ireland scored all five of their penalties, goalkeeper Joe Collins was the hero, saving Wales' final spot-kick.
Jason Donohue's side came into the game knowing victory would seal third place in the Vlatko Markovic Tournament after their 2-1 defeat to hosts Croatia on Friday. The match didn't get off to the best start for Donohue's side as Makenzie Bradbury put Wales into the lead in the eighth-minute.
From an Irish free-kick, Wales countered and after a shot was blocked, Bradbury was there to slot home from just outside the area. Ireland responded in the perfect fashion with an equaliser 11 minutes later.
Niall McAndrew dispatched a fine individual effort as he collected the ball on the right, dropped his shoulder and finished with his left-foot into the bottom corner, thanks to a fine assist from Matthew Murray.
The goals continued to flow in the first-half as Wales retook the lead from the penalty spot. Goalkeeper Joe Collins took Cruz Allen down in the area and after a short water-break, Allen stepped up to score in the 22nd minute.
Wales continued to impress on the counter but as the match continued towards the 35-minute half-time mark, Ireland equalised six minutes from the break. Charlie Hamilton's free-kick found Tommy Lillis in the area and he powered his header home to bring the tie level at the break.
Six changes at the half-time saw a slow start from Ireland as they conceded a third goal just one minute after the break. James Roche was caught on the ball and once again, Bradbury, seized the opportunity to fire home in the left-hand corner, his second of the match.
Five minutes later, Ireland came from behind for the third time in the match and it was Roche who made amends for his earlier mistake as he headed home Cathal O'Sullivan's corner to level the scores once again.
The game continued to be played at a frenetic pace and after substitute O'Sullivan was forced off through injury, Ireland had a great chance to win it in the final moments. Cristian Donlon Goncalves received the ball from Darragh Marshall who was able to find the run of Marshall but he fired wide from eight yards in the final minute of normal time.
That meant third and fourth place in the Vlatko Markovic Tournament would be decided by penalties. Moore, Orazi, Graminschii, Adebayo and Goncalves scored all five of Ireland's penalties and Joe Collins saved Wales' final penalty to seal the win, and third spot for Jason Donohue's side.
"The objective of the week was to continue to improve throughout the course of the tournament and I think we've done that. Our six goals against Uzbekistan was impressive, we dominated the game against Montenegro but couldn't find the break-through and for the majority of the match against Croatia, we were brilliant until the heat got to us," said U-15 Head Coach Jason Donohue.
"Even though we've got the result today against Wales, we're really happy overall with the camp and our performance levels. We talked about mental strength with the players all week and even though there is no next round, we wanted the players to have that mentality instilled in them and the character was so strong today.
"Sean St. Ledger, my assistant, he works with Leicester City and they did research on penalties so we were able to use that research with the players. Sean talked it through with them and the players showed that calmness today. The preparation behind it should be credited to Sean as it really helped with the win today."
Republic of Ireland: Joseph Collins (GK), Fiachra Coffey (Kaylem Harnett 36), Tommy Lillis, Eric Schutte (Marven Chan 53), Niall McAndrew (Cathal O’Sullivan 36, Afi Adebayo 60), Luke O'Donnell (Sean Moore 36), Matthew Murray (Ike Orazi 36), Kyle Fitzgerald (C) (Ivan Graminschii 53), Charlie Hamilton (Cristian Donlon Goncalves 36), Darragh Marshall, Alain Kizenga (James Roche 36).
Wales: Jack Ruddy (GK), Charlie Walker-Smith, Brayden Clarke, Makenzie Bradbury (C), Elliot Myles, Cruz Allen, Benjamin Phillips, Reece Bellis, Luca Picotto, Hari Roberts, Luis Gardner.
Ireland Goals: Niall McAndrew (17), Tommy Lillis (29), James Roche (42)
Ireland Penalties: Sean Moore 1-0, Ike Orazi 2-1, Ivan Graminschii 3-2, Afi Adebayo 4-3, Cristian Donlon Goncalves 5-4.
Results - Vlatko Markovic Tournament
11/05 - Republic of Ireland 0-0 Montenegro
12/05 - Uzbekistan 0-6 Republic of Ireland
13/05 - Croatia 2-1 Republic of Ireland
15/05 - Republic of Ireland 3-3 Wales (5-4 pens)