Inaki came off the bench to put the hosts ahead right at the end of the first additional period before Nico, eight years his junior at 21, applied the finishing touch with the last kick of the game.
The Catalans’ previous two visits in the competition in 2020 and 2022 both ended in defeat and when Inaki Williams reacted brilliantly to a huge stroke of luck by converting his own shot which rebounded off a post, history repeated itself.
It was no less than they deserved after stunning Barca by taking the lead after just 36 seconds through Gorka Guruzeta.
The visitors turned things around with goals from Robert Lewandowski and Lamine Yamal in a six-minute spell midway through the first half but they never looked comfortable and Oihan Sanchet’s equaliser – from a sublime Nico Williams cross – just after the interval paved the way for former Barcelona coach Ernesto Valverde’s side to win the game over 120 minutes.
LaLiga leaders Girona were also knocked out as they fell to a 3-2 defeat at 10-man Real Mallorca.
The hosts scored three times in the first half courtesy of Cyle Larin and two efforts from Abdon Prats, one a stunning strike and the other a penalty.
Girona pulled a goal back midway through the second half when Cristhian Stuani scored a spot-kick after being fouled by Antonio Raillo, who was sent off, and they reduced the deficit further via a Savio finish in the sixth minute of stoppage time, but a last-gasp equaliser proved beyond them.