Australian Mark Webber seized pole position for the Spanish GP ahead of team mate Sebastian Vettel on an all Red Bull front row.
The pole was the team's fifth in five races, and Webber's second of the season.
“This pole was for the team, both sides of the garage have had about five hours sleep in the last two nights. They have really worked incredibly hard,” said Webber, who will start from the top slot for the third time in his career. “It's a sensational qualifying for both Seb and myself.”
Lewis Hamilton was third fastest and shares the second row with Fernando Alonso.
Alonso was under investigation by the stewards, however, for a pit lane incident involving Mercedes’ Nico Rosberg.
World champion Jenson Button, in a McLaren, and seven-times champion Michael Schumacher, for Mercedes, will line up together on the third row. Schumacher's sixth place marked the first time that the 41-year-old had qualified ahead of team mate Rosberg and was also his highest grid position of the year.
Rosberg qualified eighth with Poland's Robert Kubica seventh for Renault but the German was unhappy that Ferrari had released Alonso straight into his path in the pit lane at the start of the decisive final phase.
“Alonso should get a penalty for that,” he told the team over the radio. At the back, Renault's Vitaly Petrov qualified 14th but collected a five place penalty for an unscheduled gearbox change.
Both Virgin Racing cars were also demoted five places for a breach of the technical regulations having qualified 21st and 22nd. Karun Chandhok, who qualified behind them in 23rd, goes at the back after a gearbox change.
Ferrari fined $20,000 for pit incident
Ferrari were fined $20,000 for releasing Fernando Alonso's car into the path of Rosberg's Mercedes during qualifying. Alonso was not personally punished.
“I didn't see Nico unfortunately, the angle of vision is not perfect to see anyone coming from the pits so you rely on your mechanic,” Alonso said.
The stewards said in a statement that after hearing evidence from a Ferrari representative, they had found the team had breached the sporting regulations.