Kevin Foley played 45 minutes of the Republic of Ireland's friendly against a Tuscan XI in Pistoia on Tuesday night just hours after being told he would not be going to Euro 2012.

The Wolves defender was introduced as a half-time substitute in the 5-0 victory over a third and fourth division representative side put together by two of Giovanni Trapattoni's former players, Ennio Pellegrini and Aldo Firicano.

Robbie Keane's first-half double either side of Simon Cox's goal eased the Republic out of sight before half-time, and the substitutes Shane Long and Jon Walters completed the scoring.

Foley's participation came after he had been told he was being left out of the final 23 for Poland and Ukraine despite clearly being fit with Paul McShane, who joined up last week as defensive cover, getting the nod instead.

Keane set the ball rolling when he capitalised on an error by the central defender Federico Settepassi to smash home a rising 18th-minute drive and he might have made it 2-0 three minutes later – after Corrado Colombo, his former Internazionale team-mate, had hit the post at the other end – but mis-kicked in front of goal.

James McClean had a 24th-minute shot beaten away by Francesco Gaffino, who produced a fine save to keep out Cox's effort from Stephen Hunt's cross, only for the striker to fire home the rebound.

Keane helped himself to a second goal after a slick build-up between Paul Green and Cox 14 minutes before the break.

Keane, McClean, Richard Dunne and Keiren Westwood made way at half-time for Long, Walters, Foley and David Forde, and Long hit the bar within three minutes of his arrival.

Forde had to get down well to keep out a 54th-minute shot from Gianluca Bugelli but Long made it 4-0 after beating the offside trap 10 minutes later.

Green hit a long-range 80th-minute shot wide after exchanging passes with Long but Walters completed the scoring four minutes later after Foley's free-kick had been parried by the substitute goalkeeper Tomasso Strambi.