A sloppy Ireland put a poor first-half behind them to emerge 28-17 winners over Argentina on Saturday, in an unconvincing warm-up to next week's meeting of the world's top two teams when New Zealand visit Dublin.
Ireland were fortunate to edge an error-strewn first 40 minutes and trailed early in the second period, before finding some much-needed composure to pull away from the dangerous Pumas in the final quarter.
"A lot of things we can do better out there. We have to move on but we'll take that result. We had to dig really deep," man-of-the-match James Ryan afterwards.
The home side's day, however, was marred by the news that flanker Sean O'Brien, forced off through injury, had broken his arm.
Nicolas Sanchez opened the scoring early on with a fine long-range penalty, something his opposite number Johnny Sexton would turn down throughout the half to offer his superior pack as many drives for the line as possible.
Held up on their first raid, Ireland destroyed the visitors' front five in the resulting scrum as No.9 Kieran Marmion sniped over for the opening try. A missed conversion from Sexton allowed Sanchez to restore the advantage two minutes later.
Ireland had lost Robbie Henshaw to an injury in the warm-up and Argentina took advantage of their hosts' re-jigged centre partnership when Matias Orlando ghosted through midway through the half to set up Bautista Delguy for an easy finish in the corner.
A scrappy Ireland continued to struggle with the wet ball in hand but were in total control when they kept it tight up front and a dominant scrum again served up a try-scoring opportunity that was ruthlessly gobbled up by centre Bundee Aki.
After Sanchez accepted another shot from distance through a softly-conceded penalty, Sexton nudged the hosts into a scarcely deserved lead after a first-half made even worse by the departure of the injury-prone O'Brien, his arm in a makeshift sling.
It also proved a tough test for 21-year-old Irish fullback Jordan Larmour, who struggled under the high ball all day and had few chances to showcase the skills that marked his three-try full debut against Italy last week.
Fresh from their best performance in the Rugby Championship and making far fewer errors, Argentina retook the lead again through a Sanchez penalty after the break and it stayed that way until Sexton made it 18-17 close to the hour.
However Ireland improved to look far more like the team that had won 15 of their last 16 tests, and a try from replacement scrum-half Luke McGrath, following a decisive lineout steal, gave them some breathing space for the first time.
Five more points from Sexton closed out a victory that was far from guaranteed.