Inter Milan crashed out of the Champions League on Tuesday after 17-year-old Ansu Fati became the youngest scorer in the competition's history by firing in a late winner to seal Barcelona's 2-1 victory at San Siro.
Barca coach Ernesto Valverde rested Lionel Messi and several other key players for the trip to Milan, having already secured top spot in Group F, but Carles Perez put the Spaniards in front on his Champions League debut after just 23 minutes before Romelu Lukaku levelled on the stroke of halftime.
Inter striker Lautaro Martinez had the ball in the net twice after the break, only for both goals to be disallowed for offside, before Fati smashed in a sublime finish inside the final five minutes.
The Italian side needed to at least match Borussia Dortmund's result against Slavia Prague to maintain second place, but the Germans won 2-1 to move into the runner-up spot and consign Inter to a Europa League place.
Barcelona top the group with 14 points ahead of Dortmund on 10, while Inter finish third on seven ahead of rock-bottom Slavia Prague on two.
Valverde left Messi, Sergi Roberto, and Gerard Pique at home and the likes of Marc-Andre Ter Stegen, Luis Suarez, Sergio Busquets, and Frenkie de Jong on the bench as he fielded a youthful side in an experimental 3-5-2 formation that mirrored Inter's tactical set-up.
"There were many new things, between the players and the system. I made my choices based on the players I had available," Valverde said, while praising Fati as a "born goalscorer".
"At the start Inter put us under great pressure, but little by little that intensity reduced and we managed to get into their half," he added.
The hosts started with intent, as a last-gasp Clement Lenglet block denied Lukaku's close-range effort before Barcelona's debutant goalkeeper Neto was forced into a good save to deny Cristiano Biraghi's rasping shot.
However, it was the visitors who broke the deadlock against the run of play on the 23rd minute, when Antoine Griezmann's drilled pass was diverted into the path of Perez and the 21-year-old made no mistake from close range.
Inter's partnership of Martinez and Lukaku looked threatening throughout the first half and they combined for the equaliser on the brink of half-time, when Martinez showed great strength to hold off a defender and tee up the Belgian, whose low strike flew into the bottom corner.
Lukaku had a great chance to put the hosts in front on the hour mark when he outmuscled a defender to go one-on-one with the goalkeeper, but Neto was out quickly to charge down his shot.
Martinez thought he had found the breakthrough when he chested down a through ball and fired home, before being denied by the offside flag, and Inter again had a goal chalked off when Lukaku was in an offside position before Martinez prodded in from close range.
"We had the chances to win the game, we created those opportunities, but lacked that clinical edge to convert them," Inter coach Antonio Conte told Sky Sport Italia.
"I have no complaints to make, as my players gave their all. We just lacked a goal and instead conceded at the other end to go 2-1 down, which really killed us."
It was Fati - 17 years and 40 days old - who stole the show just a minute after coming off the bench, exchanging passes with Suarez on the edge of the area before the winger arrowed his low shot in off the post.