Limerick - The Barbarians withstood a comeback from a second-string Ireland team on Friday to win 29-23 after scoring three tries to two.
Xavier Rush, George Smith, Cedric Heymans touched down for the all-star team at Thomond Park, with Brock James kicking 11 points and Jean-Baptiste Elissalde adding a penalty goal.
Trailing 21-3, Ireland hit back with tries to Niall Ronan and Tony Buckley either side of halftime. Ronan O'Gara added 13 points.
It was also the final professional game for former Ireland lock Malcolm O'Kelly, who played for the Barbarians.
Ireland plays a test at New Zealand on June 12 in New Plymouth and takes on Australia in Brisbane on June 26.
Result:
Ireland 23 Barbarians 29
Half-time: 10-21
Scorers
Ireland: Tries - Ronan, Buckley, Conversions - O'Gara (2), Penalties - O'Gara (3)
Barbarians: Tries - Rush, Smith, Heymans, Conversion - James, Penalties - James (3), Elissalde