Qualifying for Round 5 of the 2017 F1 season, the Spanish Grand Prix, took place at the Circuit de Barcelona-Catalunya. The session consisted of three stages, Q1, Q2 and Q3.
Lewis Hamilton set a 1:19.149 in Q3 to take pole position by 0.051s. Sebastian Vettel finished second with a 1:19.200, followed by Valtteri Bottas in third with a 1:19.373.
The top ten in qualifying were Lewis Hamilton, Sebastian Vettel, Valtteri Bottas, Kimi Räikkönen, Max Verstappen, Daniel Ricciardo, Fernando Alonso, Sergio Pérez, Felipe Massa and Esteban Ocon, in that order.
Positions 11 to 15 were occupied by Kevin Magnussen, Carlos Sainz, Nico Hülkenberg, Romain Grosjean and Pascal Wehrlein, in that order.
The remaining classified drivers were Marcus Ericsson in 16th, Jolyon Palmer 17th, Lance Stroll 18th, Stoffel Vandoorne 19th and Daniil Kvyat 20th.
| Position | Car No. | Driver | Team | Q1 Time | Q2 Time | Q3 Time | Laps |
|---|---|---|---|---|---|---|---|
| 1 | 44 | Lewis Hamilton | Mercedes | 1:20.511 | 1:20.210 | 1:19.149 | 12 |
| 2 | 5 | Sebastian Vettel | Ferrari | 1:20.939 | 1:20.295 | 1:19.200 | 16 |
| 3 | 77 | Valtteri Bottas | Mercedes | 1:20.991 | 1:20.300 | 1:19.373 | 15 |
| 4 | 7 | Kimi Räikkönen | Ferrari | 1:20.742 | 1:20.621 | 1:19.439 | 14 |
| 5 | 33 | Max Verstappen | Red Bull | 1:21.430 | 1:20.722 | 1:19.706 | 12 |
| 6 | 3 | Daniel Ricciardo | Red Bull | 1:21.704 | 1:20.855 | 1:20.175 | 12 |
| 7 | 14 | Fernando Alonso | McLaren | 1:22.015 | 1:21.251 | 1:21.048 | 15 |
| 8 | 11 | Sergio Pérez | Force India | 1:21.998 | 1:21.239 | 1:21.070 | 14 |
| 9 | 19 | Felipe Massa | Williams | 1:22.138 | 1:21.222 | 1:21.232 | 15 |
| 10 | 31 | Esteban Ocon | Force India | 1:21.901 | 1:21.148 | 1:21.272 | 17 |
| 11 | 20 | Kevin Magnussen | Haas | 1:21.945 | 1:21.329 | — | 13 |
| 12 | 55 | Carlos Sainz | Toro Rosso | 1:21.941 | 1:21.371 | — | 12 |
| 13 | 27 | Nico Hülkenberg | Renault | 1:22.091 | 1:21.397 | — | 12 |
| 14 | 8 | Romain Grosjean | Haas | 1:21.822 | 1:21.517 | — | 13 |
| 15 | 94 | Pascal Wehrlein | Sauber | 1:22.327 | 1:21.803 | — | 15 |
| 16 | 9 | Marcus Ericsson | Sauber | 1:22.332 | — | — | 9 |
| 17 | 30 | Jolyon Palmer | Renault | 1:22.401 | — | — | 6 |
| 18 | 18 | Lance Stroll | Williams | 1:22.411 | — | — | 7 |
| 19 | 2 | Stoffel Vandoorne | McLaren | 1:22.532 | — | — | 9 |
| 20 | 26 | Daniil Kvyat | Toro Rosso | 1:22.746 | — | — | 6 |