LILLE, France — A late goal from Robby Brady proved enough for Ireland to beat Italy 1-0 on Wednesday and secure a place for his team in the knockout stages of the European Championship.

Brady’s 85th minute header ended Ireland’s 22-year wait for a competitive win over Italy and guaranteed that the team ended up as one of the best third-place teams. Its reward — a round of 16 match against France in Lyon on Sunday.

It’s the first time Ireland has made it to the knockout stage of the European Championship, having failed to do so in its two previous appearances, in 1988 and 2012.

Italy, which was already assured of top spot in Group E after two straight group wins, will meet defending champion Spain next in what is potentially the most mouth-watering match of the round of 16.

Brady’s goal was just reward for an inspired performance by the Ireland team, which needed to win to get through to the next round.

His goal, which stemmed from a cross by second-half substitute Wes Hoolahan, came just moments after Hoolahan himself had missed a golden chance to put Ireland ahead.

advertisement | advertise on newsday

Spurred on by its passionate green-clad fans, Ireland tried to drag the Italians into a physical battle almost from the opening whistle. In the first few minutes, there were some crunching tackles, most notably when Jeff Hendrick hit Alessandro Florenzi with a flying tackle.

Weakened by the absence of injured striker Jon Walter, Ireland missed two clear chances to take the lead in the first half. Hendrick sent a 20-meter shot just wide and Daryl Murphy saw his header off a corner from Robbie Brady saved by goalkeeper Salvatore Sirigu.

Italy’s only first-half attempt came two minutes before halftime when Ciro Immobile’s 20-meter curling shot went just wide.

While Ireland strived for a winner, Italy found some fluency in the second half. Simone Zaza went close in the 53rd with a powerful volley that went just over the cross bar, and substitute Lorenzo Insigne hit the far post with a curling low shot from outside the area.

Ahead of the next round, Italy coach Antonio Conte had left eight regular starters out of his lineup, including goalkeeper Gianluigi Buffon, who has been suffering from a fever over the last few days. Only defenders Andrea Barzagli and Leonardo Bonucci as well as midfielder Alessandro Florenzi started in Italy’s previous game against Sweden.