Gavi announced himself on the global stage with a brilliant volley as Spain produced a sparkling passing performance to outclass Costa Rica and start their World Cup in sensational style.
Ferran Torres scored twice in what was a stroll from start to finish for the 2010 champions.
But the pick of their seven goals was Gavi's outstanding volleyed finish, with the Barcelona teenager using the outside of his foot to steer a dropping ball home via the post and become the youngest World Cup goalscorer since Pele.
This has been a tournament full of surprises, with Spain's Group E rivals Germany the latest victims with their late defeat by Japan earlier on Wednesday, but there was never a hint of another shock happening here.
La Roja were completely dominant from the start, with Costa Rica unable to live with their pace, movement and precision when they came forward.
The Euro 2020 semi-finalists went close twice in the first 10 minutes, with Dani Olmo and Marco Asensio both firing wide, but they did not have to wait long to take the lead.
- 'Two parallel universes on World Cup human rights controversies'
Olmo had work to do to when he met Gavi's delicate chipped pass into the area, but he used his strength to hold off Oscar Duarte then span into space to expertly slot past the onrushing Keylor Navas.
It was an ominous start for Costa Rica and things quickly got worse for the 2014 quarter-finalists, who were the last team to qualify for Qatar.
Again Spain advanced up the middle of the pitch unopposed, before the ball was spread left to Jordi Alba and his driven cross was met powerfully by Asensio - although Navas should have done far better with his attempted save.
Victory was sealed just after the half-hour mark, when Torres sent Navas the wrong way from the spot after Duarte had hacked at Alba in the box.
But there was more misery to come for Costa Rica after the break, with Spain still hungry for goals.
Torres capitalised on more poor defending to make it 4-0, collecting a loose ball after bursting into the box and then calmly firing home.
Gavi's superb strike added gloss to an already glittering display, with the 18-year-old finding a finish to match his impressive performance after meeting a cross from substitute Alvaro Morata.
Another substitute, Carlos Soler, made it six after Navas failed to deal with a cross, and Morata rounded off the scoring in injury time after playing a one-two with Olmo.
- Does thrashing Costa Rica make Spain contenders?
- World Cup TV Coverage guide
Spain's youngsters produce dazzling display
At 18 years and 110 days, Gavi is the youngest man to play for Spain at a World Cup and his goal made him the youngest goalscorer at a finals since Brazilian Pele in 1958.
The way he took it was worthy of the legend mentioned in that statistic, and capped a display which was mature beyond his years.
He was not the only young Spanish player to dazzle either, with 19-year-old Pedri also enjoying an outstanding evening in midfield.
Costa Rica were hugely disappointing but also barely had a kick, managing only 231 passes to 1,043 from Spain, while failing to register a single effort at goal.
Spain had lost their opening matches at the past three World Cups, including in 2010 when they went on to win the tournament.
This time, they could not have made a more emphatic start, and will be in confident mood when they face Germany in their next game, knowing another win would all but eliminate their great European rivals.
Player of the match
F TorresFerran Torres
with an average of 8.05
- SpainSpainSpain
- Costa RicaCosta RicaCosta Rica
Spain
Avg
Squad number11Player nameF Torres
Average rating
8.05
Squad number9Player nameGavi
Average rating
8.01
Squad number26Player namePedri
Average rating
7.89
Squad number21Player nameOlmo
Average rating
7.62
Squad number24Player nameLaporte
Average rating
7.58
Squad number19Player nameSoler
Average rating
7.58
Squad number12Player nameNico Williams
Average rating
7.53
Squad number18Player nameAlba
Average rating
7.53
Squad number10Player nameAsensio
Average rating
7.49
Squad number16Player nameRodri
Average rating
7.47
Squad number7Player nameMorata
Average rating
7.47
Squad number8Player nameKoke
Average rating
7.40
Squad number5Player nameBusquets
Average rating
7.28
Squad number2Player nameAzpilicueta
Average rating
7.18
Squad number14Player nameBalde
Average rating
7.12
Squad number23Player nameSimón
Average rating
6.61
Costa Rica
Avg
Squad number9Player nameBennette
Average rating
5.51
Squad number1Player nameNavas
Average rating
4.95
Squad number12Player nameCampbell
Average rating
4.78
Squad number20Player nameAguilera
Average rating
4.40
Squad number10Player nameRuiz
Average rating
4.30
Squad number8Player nameOviedo
Average rating
4.25
Squad number16Player nameMartínez
Average rating
4.14
Squad number5Player nameBorges
Squad number15Player nameCalvo
Average rating
4.07
Squad number4Player nameFuller
Average rating
4.07
Squad number6Player nameDuarte
Average rating
4.00
Squad number19Player nameWaston
Average rating
3.99
Squad number17Player nameTejeda
Average rating
3.97
Squad number26Player nameZamora
Average rating
3.77
Squad number22Player nameMatarrita
Average rating
3.71
Squad number7Player nameContreras
Average rating
3.68
- Line-ups
- Match Stats
- Live Text
Line-ups
Spain
Formation 4-3-3
23Simón
2Azpilicueta16Rodri24Laporte18Alba
9Gavi5Busquets26Pedri
11F Torres10Asensio21Olmo
- 23Simón
- 2Azpilicueta
- 16Rodri
- 24Laporte
- 18AlbaSubstituted forBaldeat 64'minutes
- 9Gavi
- 5BusquetsSubstituted forKokeat 64'minutes
- 26PedriSubstituted forSolerat 57'minutes
- 11F TorresSubstituted forMorataat 57'minutes
- 10AsensioSubstituted forNico Williamsat 69'minutes
- 21Olmo
Substitutes
- 1Sánchez
- 3García
- 4P Torres
- 6Llorente
- 7Morata
- 8Koke
- 12Nico Williams
- 13Raya
- 14Balde
- 15Guillamón
- 17Pino
- 19Soler
- 20Carvajal
- 22Sarabia
- 25Ansu Fati
Costa Rica
Formation 4-4-2
1Navas
16Martínez6Duarte15Calvo8Oviedo
4Fuller5Borges17Tejeda9Bennette
12Campbell7Contreras
- 1Navas
- 16MartínezSubstituted forWastonat 45'minutes
- 6Duarte
- 15CalvoBooked at 68mins
- 8OviedoSubstituted forMatarritaat 82'minutes
- 4Fuller
- 5BorgesSubstituted forAguileraat 72'minutes
- 17Tejeda
- 9BennetteSubstituted forRuizat 61'minutes
- 12CampbellBooked at 90mins
- 7ContrerasSubstituted forZamoraat 61'minutes
Substitutes
- 2Chacón
- 3Vargas
- 10Ruiz
- 11Venegas
- 13Torres
- 14Salas
- 18Alvarado
- 19Waston
- 20Aguilera
- 21López
- 22Matarrita
- 23Sequeira
- 24Wilson
- 25Hernández
- 26Zamora
- Referee:
- Mohammed Abdulla Hassan
- Attendance:
- 40,013
Match Stats
Home TeamSpainAway TeamCosta Rica
- Possession
- Home82%
- Away18%
- Shots
- Home17
- Away0
- Shots on Target
- Home8
- Away0
- Corners
- Home5
- Away0
- Fouls
- Home8
- Away12
Live Text
Post update
Match ends, Spain 7, Costa Rica 0.
Full Time
Second Half ends, Spain 7, Costa Rica 0.
Post update
Attempt blocked. Carlos Soler (Spain) right footed shot from a difficult angle and long range on the left is blocked.
Booking
Joel Campbell (Costa Rica) is shown the yellow card for a bad foul.
Post update
Alejandro Balde (Spain) wins a free kick on the left wing.
Post update
Foul by Joel Campbell (Costa Rica).
Post update
Attempt missed. Carlos Soler (Spain) right footed shot from the centre of the box misses to the right. Assisted by Gavi.
Post update
Gavi (Spain) wins a free kick on the right wing.
Post update
Foul by Brandon Aguilera (Costa Rica).
Goal!
Goal! Spain 7, Costa Rica 0. Álvaro Morata (Spain) left footed shot from the centre of the box to the bottom left corner. Assisted by Dani Olmo.
Post update
Foul by César Azpilicueta (Spain).
Post update
Ronald Matarrita (Costa Rica) wins a free kick in the defensive half.
Goal!
Goal! Spain 6, Costa Rica 0. Carlos Soler (Spain) right footed shot from the centre of the box to the bottom right corner.
Post update
Foul by Aymeric Laporte (Spain).
Post update
Joel Campbell (Costa Rica) wins a free kick in the defensive half.
Post update
Gavi (Spain) wins a free kick in the attacking half.
Post update
Foul by Brandon Aguilera (Costa Rica).
Post update
Hand ball by César Azpilicueta (Spain).
Substitution
Substitution, Costa Rica. Ronald Matarrita replaces Bryan Oviedo.
Post update
Offside, Spain. Koke tries a through ball, but Álvaro Morata is caught offside.
Page 1 of 5
Get the latest results and goal notifications for any team at the Fifa World Cup by downloading the BBC Sport app: Apple - Android - Amazon
Get your daily dose of Fifa World Cup reaction, debate & analysis with World Cup Daily on BBC Sounds