Inter Milan was knocked out of the Champions League on Tuesday with a 2-1 home loss to an under-strength Barcelona side.

Teenager Ansu Fati scored the winner for Barcelona four minutes from time after Inter forward Romelu Lukaku had cancelled out the opener from Champions League debutant Carles Pérez.

More Images
Inter Milan's Lautaro Martinez, second right, reacts after his goal was disallowed for offside during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Inter Milan was knocked out of the Champions League on Tuesday with a 2-1 home loss to an under-strength Barcelona side.

Inter Milan's Romelu Lukaku, left, reacts after a missed scoring opportunity during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Barcelona had already won Group F and finished four points above Dortmund and seven above Inter, which will go into the Europa League.

Inter Milan's Romelu Lukaku, right, celebrates with Inter Milan's Lautaro Martinez after scoring his side's opening goal during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Inter Milan's Romelu Lukaku, right, celebrates with Inter Milan's Lautaro Martinez after scoring his side's opening goal during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Barcelona's Carles Perez, right, celebrates with his teammate Barcelona's Arturo Vidal after scoring his side's opening goal during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Barcelona's Carles Perez, right, celebrates with his teammate Barcelona's Arturo Vidal after scoring his side's opening goal during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Inter Milan's head coach Antonio Conte shouts out from the touchline during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Inter Milan's head coach Antonio Conte shouts out from the touchline during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Barcelona's Carles Perez, top, celebrates with Barcelona's Moussa Wague after scoring his side's opening goal during the Champions League group F soccer match between Inter Milan and Barcelona at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoAntonio Calanni)

Barcelona's Carles Perez, top, celebrates with Barcelona's Moussa Wague after scoring his side's opening goal during the Champions League group F soccer match between Inter Milan and Barcelona at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoAntonio Calanni)

Inter, which had three goals ruled out for offside, needed to at least match Borussia Dortmund’s result against Slavia Prague to progress to the round of 16 but the German side won 2-1.

Inter Milan's Lautaro Martinez, second right, reacts after his goal was disallowed for offside during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Inter Milan's Lautaro Martinez, second right, reacts after his goal was disallowed for offside during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Barcelona had already won Group F and finished four points above Dortmund and seven above Inter, which will go into the Europa League.

The Spanish side rested a number of key players for the match, including six-time Ballon d’Or winner Lionel Messi.

More AP soccer: https://apnews.com/Soccer and https://twitter.com/AP_Sports

Inter Milan's Romelu Lukaku, left, reacts after a missed scoring opportunity during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Inter Milan's Romelu Lukaku, left, reacts after a missed scoring opportunity during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Inter Milan's Romelu Lukaku, right, celebrates with Inter Milan's Lautaro Martinez after scoring his side's opening goal during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Inter Milan's Romelu Lukaku, right, celebrates with Inter Milan's Lautaro Martinez after scoring his side's opening goal during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Barcelona's Carles Perez, right, celebrates with his teammate Barcelona's Arturo Vidal after scoring his side's opening goal during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Barcelona's Carles Perez, right, celebrates with his teammate Barcelona's Arturo Vidal after scoring his side's opening goal during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Inter Milan's head coach Antonio Conte shouts out from the touchline during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Inter Milan's head coach Antonio Conte shouts out from the touchline during the Champions League, group F soccer match between Inter Milan and F.C. Barcelona, at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoLuca Bruno)

Barcelona's Carles Perez, top, celebrates with Barcelona's Moussa Wague after scoring his side's opening goal during the Champions League group F soccer match between Inter Milan and Barcelona at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoAntonio Calanni)

Barcelona's Carles Perez, top, celebrates with Barcelona's Moussa Wague after scoring his side's opening goal during the Champions League group F soccer match between Inter Milan and Barcelona at the San Siro stadium in Milan, Italy, Tuesday, Dec. 10, 2019. (AP PhotoAntonio Calanni)