Stephen Ireland's first-half goal gave the Republic of Ireland a vital Euro 2008 win in the historic first football match at Dublin's Croke Park.
Stephen Ireland evades Danny Coyne for the winning goal
Wales' inexperienced five-man defence struggled in the cauldron, and Robbie Keane exploited James Collins' lack of awareness in the sweeper role.
Ireland seized on Keane's through ball, rounded keeper Danny Coyne, and clipped in from the narrowest of angles.
The result almost certainly ends Wales' hopes of Group D qualification.
But the Irish will go into Wednesday's Croke Park game against Slovakia with renewed confidence, the pressure having been eased on manager Steve Staunton.
They will be missing Keane in that game as the Tottenham striker took a second-half booking, as did Wales' Carl Robinson who will miss Wednesday's visit of San Marino to Cardiff's Millennium Stadium.
After the emotion of the anthems in front of 72,539 fans in Dublin, Wales' back line showed their nerves.
Keane wasted two early chances for the home side, before Wales striker Craig Bellamy used his pace to get past Paul McShane and clear on goal.
Giggs struggled to exert his influence up front
Republic keeper Shay Given came out quickly with a strong challenge that denied the Liverpool front man and left him writhing on the floor.
At the other end, Collins was looking uncomfortable in his unfamiliar role, missing the experience of Danny Gabbidon and Mark Delaney alongside him.
A hash of a clearance from the West Ham man gave Keane another chance, and Coyne needed to save well at the feet of Damien Duff when he was put clear by the Tottenham striker.
Keane inevitably played a hand in the first Croke Park goal moments later, his through ball sending Ireland past the flat-footed Collins with only Coyne to beat.
The midfielder went around the Burnley keeper's clumsy challenge before clipping in.
Wales manager John Toshack brought Carl Fletcher on for Joe Ledley at the break, but stuck with his 5-3-2 formation as the home side continued to hold a monopoly on chances.
As the game approached its final third the visitors finally began to settle into some flowing football, a superb Gareth Bale cross causing some panic in the Republic defence.
With Simon Davies taking control in midfield, the visitors began to play with some tempo and style.
The cutting edge was missing, though, prompting Toshack to replace Bale with Danny Collins, James Collins being pushed up front in a revamped 4-4-2 line-up.
But the momentum swung back to the home side, Kevin Kilbane going close with a header from a corner, Kevin Doyle hitting the bar with a looping shot, and a brave Robinson challenge in the box denying Keane.
Rep of Ireland: Given, Finnan, McShane, Dunne, O'Shea, Douglas (Hunt 80), Carsley, Ireland (Kevin Doyle 59), Kilbane, Keane (McGeady 89), Duff.
Subs Not Used: Colgan, Keogh, Stokes, Harte.
Goals: Ireland 39.
Wales: Coyne, Ricketts, Bale (Danny Collins 74), James Collins, Evans, Nyatanga, Ledley (Fletcher 45), Robinson (Easter 90), Simon Davies, Giggs, Bellamy.
Subs Not Used: Ward, Parry, Duffy, Cotterill.
Booked: Ricketts, Robinson.
Ref: Terje Hauge (Norway).