The players were taken from the pitch when the severity of the fan's condition was established
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.
- Line-upsMatch StatsLive Text
Line-upsCádiz
Formation 4-2-3-1
1Ledesma2Zaldua23Hernández5Mbaye22Espino8Fernández Iglesias24San Emeterio DÃaz11Alejo7Sobrino14Ocampo15Pérez
- 1Ledesma2Zaldua23Hernández5Mbaye22Espino8Fernández IglesiasSubstituted forAlarcónat 59'minutes24San Emeterio DÃazSubstituted forAlcarazat 72'minutes11AlejoSubstituted forBongondaat 60'minutes7SobrinoSubstituted forNegredoat 72'minutes14Ocampo15PérezBooked at 56minsSubstituted forMabilat 72'minutes
Substitutes
- 3Jiménez Jarque4Alcaraz6MartÃn-Bejarano Serrano10Bongonda12Alarcón13Gil17Mabil18Negredo19Giménez20Carcelén21Arzamendia32Chust
Barcelona
Formation 4-3-3
1ter Stegen2BellerÃn4Araújo3Piqué28Balde MartÃnez21de Jong5Busquets30Páez Gavira22Raphinha14Depay11Torres
- 1ter Stegen2BellerÃn4Araújo3Piqué28Balde MartÃnezSubstituted forAlonsoat 78'minutes21de Jong5BusquetsBooked at 53mins30Páez GaviraSubstituted forGonzálezat 57'minutes22RaphinhaBooked at 16minsSubstituted forFati Vieiraat 72'minutes14DepaySubstituted forLewandowskiat 57'minutes11TorresSubstituted forDembéléat 57'minutes
Substitutes
- 7Dembélé8González9Lewandowski10Fati Vieira15Christensen17Alonso18Alba19Kessie23Koundé24GarcÃa26Peña Sotorres36Tenas
Referee:Carlos del Cerro GrandeAttendance:19,530Match StatsHome TeamCádizAway TeamBarcelonaPossessionHome29%Away71%ShotsHome6Away16Shots on TargetHome0Away8CornersHome5Away6FoulsHome12Away13Live TextPost update
Match ends, Cadiz 0, Barcelona 4.
90'+4'Full Time
Second Half ends, Cadiz 0, Barcelona 4.
90'+3'Post update
Robert Lewandowski (Barcelona) wins a free kick in the defensive half.
90'+3'Post update
Foul by Luis Hernández (Cadiz).
90'+2'goalGoal!
Goal! Cadiz 0, Barcelona 4. Ousmane Dembélé (Barcelona) right footed shot from the centre of the box to the bottom right corner. Assisted by Robert Lewandowski.
90'+1'Post update
Corner, Cadiz. Conceded by Ronald Araújo.
90'Post update
Corner, Barcelona. Conceded by Joseba Zaldua.
90'Post update
Offside, Barcelona. Ronald Araújo tries a through ball, but Ansu Fati is caught offside.
89'Post update
Attempt missed. Alfonso Espino (Cadiz) left footed shot from more than 40 yards on the left wing misses to the left.
88'Post update
Marcos Alonso (Barcelona) wins a free kick in the defensive half.
88'Post update
Foul by Brian Ocampo (Cadiz).
86'goalGoal!
Goal! Cadiz 0, Barcelona 3. Ansu Fati (Barcelona) left footed shot from the centre of the box to the centre of the goal. Assisted by Robert Lewandowski following a fast break.
84'Post update
Attempt missed. Rubén Alcaraz (Cadiz) right footed shot from outside the box is too high from a direct free kick.
83'Post update
Foul by Robert Lewandowski (Barcelona).
83'Post update
Joseba Zaldua (Cadiz) wins a free kick in the attacking half.
78'Post update
Foul by Robert Lewandowski (Barcelona).
78'Post update
Joseba Zaldua (Cadiz) wins a free kick in the defensive half.
78'Substitution
Substitution, Barcelona. Marcos Alonso replaces Ãlex Balde.
74'Post update
Sergio Busquets (Barcelona) wins a free kick in the defensive half.
74'Post update
Foul by Brian Ocampo (Cadiz).
Page 1 of 6rewindpreviousNavigate to the next pagenextNavigate to the last pageforward
Source: bbc.com