The Republic of Ireland enjoyed a timely confidence boost ahead of their vital clash with Denmark as they secured an impressive 3-1 victory over New Zealand at the Aviva Stadium.

The visitors opened the scoring, against the run of play, in the 30th minute as Callum McCowatt converted a close-range effort, before Ireland drew level a minute before the break thanks to a fine Derrick Williams header.

Mick McCarthy's men took the lead shortly after half-time thanks to a wonder-strike from Sean Maguire, before substitute Callum Robinson secured the victory with 15 minutes to play, as Ireland now look forward to Monday's Euro 2020 decider against the Danes.

Ireland wasted little time taking control of this international friendly, as a much-changed senior side knocked the ball around the midfield, with Jack Byrne linking play alongside Josh Cullen, who added real composure to the Irish engine room.

Debutant Troy Parrott was keen to get involved and appeared to embrace a physical battle with West Ham centre-half Winston Reid and fellow defender Michael Boxall throughout the early stages.

Ireland’s first attack of note came in the 13th minute, as Alan Browne turned his man and raced to the touchline on the right before dragging the ball back across the face of goal.

The cross eluded three green jerseys before arriving at the feet of the incoming Williams, whose attempt on goal proved well off target.

The best chance of the opening quarter came in the 22nd minute, when Maguire outsmarted Boxall to latch onto a clever ball down the inside-right channel.

The Preston striker got through on goal and may have dwelt a bit too long as the keeper stayed big to deny the attempt on goal.

New Zealand’s best work was coming from the stylish, left-sided Elijah Just cutting in off the flank, but in truth the Irish defence remained untroubled, with Burnley striker Chris Wood well marshalled in the middle.

Kieran O’Hara’s first test on his maiden start came in the 26th minute when a neat move, started by Just, popped up in the air off the foot of Ciaran Clark and the keeper had to be alert to punch clear.

New Zealand began to grow into the game and a neat passing move would set up the opening goal after half an hour’s play.

The visitors played the ball through the middle and then a decisive pass from Ryan Thomas out wide sent Liberato Cacace into space on the left flank, with Lee O’Connor drawn inside towards play and Robbie Brady failing to track back.

A low, accurate ball was sent across the six-yard line and McCowatt arrived right on cue to slot the ball home.

Ireland looked to respond and, driven on by Kevin Long and O’Connor down the right, the ball was worked to Brady just inside the box.

Another ball across the face arrived to Williams, again at the back post, and this time the Blackburn defender worked the ball inside, where first Byrne, and then Parrott had a glimpse of goal, but neither could work the keeper.

Teenager Parrott stretched his legs in the 37th minute, latching onto a long ball down the right and drew the foul from Boxall.

Brady sent the resulting free to the feet of Parrott, but the striker was crowded out, and while New Zealand cleared, the ball came straight back, this time via Brady’s right foot, with Maguire’s near-post header almost creeping in at the far stick.

Williams was again in a shooting position two minutes later following good link-up play by Parrott, but his well-hit effort flew wide of the far post.

Wood’s first look at goal came five minutes before the break when he was fed on the edge of the box from Storm Roux, but his snap-shot was blocked en route to goal.

Ireland, however, drew level a minute before the break, and it came from a set-piece delivery from Brady, who switched sides to take the corner from the left.

The ball was lifted to the edge of the six-yard box and Williams rose highest, and unchallenged, to direct the perfect downward header into the corner of the net, low to the keeper’s right.

And it was no more than the defender deserved, a reward for his endeavours, constantly pushing on from the left-back position.

New Zealand were first to create in the second half, as Thomas made space for a shot on the edge of the box, just four minutes after the restart.

The well-hit effort took a wicked deflection off an Irish body and O’Hara had to be alert to get across to his left to bat the ball away to safety.

Ireland took the lead two minutes later, as Sean Maguire smashed the ball right into the top corner.

A hopeful cross-field ball found Williams again advanced, and between himself and the endeavours of Parrott, the ball was finally laid into the path of Maguire.

The former Cork City striker took one touch to set himself up before rifling his shot home.

The goalscorer then almost turned provider in the 58th minute as Ireland raced through the middle with the visitors caught up the pitch.

Parrott timed his run perfectly as Maguire slipped him in on goal, but Stefan Marinovic was out to smother the shot as the Spurs striker opted for accuracy over pace.

Two minutes later, New Zealand were back on the attack and again Thomas took on the responsibility to let fly, forcing O’Hara to spill the well-hit effort.

O’Connor was on hand to clear the danger, with Wood lurking with intent in close attendance.

The bench was emptied for the final third of the game, with Ireland in complete control of affairs.

Man of the match Maguire left to a well-earned ovation, but not before setting Callum Robinson up for a chance, coming in off the left flank.

The Sheffield United man, mere moments on the pitch, went for the near post but the keeper spread himself well to block the low effort.

But Robinson was not to be denied, as he stooped to head home a fine O’Connor cross that arrived at pace from the right flank in the 75th minute.

Fellow substitute James Collins had a great opportunity to make it four with six minutes remaining, but a slight deflection took the ball just wide of the post.

New Zealand continued the fight into the latter stages but failed to close the gap, as substitute keeper Mark Travers got down well to prevent Andre de Jong from scoring.

Job done for Ireland as the teams both went down the gears as the clock passed 90, and now they have the guts of four days to refocus and attempt to qualify for next summer’s tournament.

Ireland: Kieran O’Hara (Mark Travers 66); Lee O’Connor, Kevin Long, Ciaran Clark, Derrick Williams (Callum O’Dowda 56); Josh Cullen, Alan Browne (Conor Hourihane 66), Jack Byrne (Alan Judge 63); Sean Maguire (James Collins 73), Robbie Brady, Troy Parrott (Callum Robinson 63)

New Zealand: Stefan Marinovic; Storm Roux (Tim Payne 90), Winston Reid (Bill Tuiloma HT), Michael Boxall (Tommy Smith 74); Joe Bell, Ryan Thomas (Michael McGlinchey 74), Sarpreet Singh, Callum McCowatt (Elliot Collier 85), Elijah Just; Chris Wood (Andre de Jong 77)

Referee: Robert Jenkins (WAL)