Barcelona’s La Liga game at Cadiz was halted for about 50 minutes when a fan had a medical emergency.
The visitors were leading 2-0 with fewer than 10 minutes remaining when the incident happened.
Cadiz goalkeeper Jeremias Ledesma ran across the pitch with a medical kit and threw it into the stands before the players were taken off.
There were two further goals when play resumed as Barca moved top of the table with a fourth successive league win.
Frenkie de Jong swept in the opener for Barca while Robert Lewandowski slid in the visitors’ second shortly after his introduction as a substitute.
The Poland forward has now scored nine goals in six appearances since his summer move from Bayern Munich.
Fellow substitute Ansu Fati added a third while France forward Ousmane Dembele rounded off the scoring late on.
Xavi’s side now sit a point above champions Real Madrid, who play Mallorca on Sunday (13:00 BST).
Barcelona have scored 15 times and conceded just once since their opening-day stalemate Rayo Vallecano.