Wales took advantage of Peter O'Mahony's 14th minute red card to beat Ireland in their Six Nations opener.
Flanker O'Mahony became the first Irishman to be sent off in the Six Nations following a reckless elbow to the head of prop Tomas Francis.
Ireland bounced back to lead 13-6 at half-time through a Tadhg Beirne try and Johnny Sexton's boot.
Tries from George North and Louis Rees-Zammit and 11 points from Leigh Halfpenny sealed success for Wales.
It was a fourth win for Wales coach Wayne Pivac in 11 competitive matches and the first against a leading nation following previous successes against Italy and Georgia.
Ireland are still to win an away game under Andy Farrell despite the 14 men of Ireland enjoying territory and possession advantage while Wales' forwards dominated the tackle charts.
Relief was the main emotion for the home side in a frantic finale.
After playing the autumn series at Parc y Scarlets, Wales returned to their Principality Stadium home after the iconic ground had been used as a coronavirus hospital in 2020. The eerie Cardiff city centre atmosphere belied what the Welsh capital would usually be like on international day.
After a period of experimentation, Pivac returned to some tried-and-tested men by picking the most experienced Wales starting side in history.
Captain Alun Wyn Jones played his first game for two months after recovering from a knee injury and was sporting a black eye following an altercation in training with Jake Ball, who was not named in the squad.
Wales had already been disrupted by suspended duo Liam Williams and Josh Adams, the latter due to a Covid-19 breach.
A cagey start saw Leigh Halfpenny open the scoring before his opposite number Hugo Keenan demonstrated his attacking abilities with an incisive break.
Dan Lydiate's first international match for more than two years was cut short after his right leg buckled underneath him, forcing the flanker off to be replaced by Josh Navidi.
The game's controversial moment came in the 14th minute when O'Mahony was red carded for a reckless arm to the head of Francis when trying to clear out a ruck.
Referee Wayne Barnes showed the Munster man a deserved red and it looked as if the game's complexion would change.
Irish indiscipline continued with a high tackle from Sexton on Johnny Williams allowing Halfpenny to double the lead.
Wales centre Williams and Ireland lock James Ryan were both forced off with head injuries before Sexton opened the Ireland account with two penalties to level the scores.
Wales' line-out woes continued and another failure set up the platform for Robbie Henshaw to burst through a missed Justin Tipuric tackle to release Josh van der Flier with Tadhg Beirne following up to dive over.
Sexton converted as Ireland deservedly led 13-6 at half-time, at which point Wales lost scrum-half Tomos Williams to a hamstring injury to the final move of the half.
It was a masterful first-half performance of game management orchestrated by Sexton as Wales were starved of possession and forced to make three times as many tackles as the visitors.
Replacement scrum-half Gareth Davies entered the fray before North crossed for Wales' opening try with an excellent break for his 42nd Wales try in his 99th international. Halfpenny missed the conversion as Wales trailed by two points.
The hosts regained the lead with a fantastic finish from Rees-Zammit in the right-hand corner with Halfpenny converting.
A thunderous charge from CJ Stander bounced Faletau on his backside before a Halfpenny penalty gave Wales an eight-point advantage.
Wales rung the changes which included a major backline reshuffle with replacement fly-half Callum Sheedy coming on for wing Amos. The alterations included Biggar moving to full-back and Halfpenny switching to the wing.
Ireland lost Sexton after his head caught the left knee of Tipuric before his replacement Burns reduced the deficit to five points with a penalty.
In a frantic finale, Gareth Davies needlessly kicked the ball away with 10 seconds left before Tipuric produced a wonderful tackle on Garry Ringrose as Ireland battered away at the Wales defence.
Ireland had a final chance, but Burns inexplicably kicked the ball dead from a penalty as a relieved Wales secured victory.
Wales: Leigh Halfpenny; Louis Rees-Zammit, George North, Johnny Williams, Hallam Amos; Dan Biggar, Tomos Williams; Wyn Jones, Ken Owens, Tomas Francis, Adam Beard, Alun Wyn Jones (capt), Dan Lydiate, Justin Tipuric, Taulupe Faletau.
Replacements: Elliot Dee, Rhodri Jones, Leon Brown, Will Rowlands, Josh Navidi, Gareth Davies, Callum Sheedy, Nick Tompkins.
Ireland: Hugo Keenan; Keith Earls, Garry Ringrose, Robbie Henshaw, James Lowe; Johnny Sexton (capt), Conor Murray; Cian Healy, Rob Herring, Andrew Porter, Tadhg Beirne, James Ryan, Peter O'Mahony, Josh van der Flier, CJ Stander.
Replacements: Ronan Kelleher, Dave Kilcoyne, Tadhg Furlong, Iain Henderson, Will Connors, Jamison Gibson Park, Billy Burns, Jordan Larmour.
Source: BBC Sport.