Rosberg’s Mercedes teammate Lewis Hamilton, who had a five-place grid penalty for a gearbox change, will start from the back of the grid after being hit by ERS problems during the opening qualifying segment.
Rosberg was second quickest until the dying seconds, when he set a blistering lap to grab pole with a best time of 1:35.402.
The championship leader outpaced a surprising Ricciardo, second in the Red Bull, but over half a second behind the German.
Crucially, Rosberg used the soft tyres to go into Q3, meaning he will be able to start the race with that compound, unlike his main rivals, who qualified with the supersofts.
Ferrari endured disappointment, as Kimi Raikkonen had to settle for third ahead of teammate Sebastian Vettel, who completed just one flying lap in Q3.
Valtteri Bottas completed the top five in the Williams, ahead of the second Red Bull of Daniil Kvyat and the Force India of Sergio Perez.
Toro Rosso duo Carlos Sainz and Max Verstappen will start eighth and ninth.
Nico Hulkenberg qualified in 10th, but the German was unable to take part in Q3 after losing his left-front wheel less than two minutes from the end of Q2.
The Force India driver could face a penalty for the incident, which is under investigation.
Q2 – Red flag causes frustration
Felipe Massa will start from 11th position in the second Williams, as many drivers were unable to complete their final runs following Hulkenberg’s incident.
A frustrated Fernando Alonso qualified 12th for McLaren, the Spaniard one of the drivers who could not finish their final flying lap.
Teammate Jenson Button finished 13th, ahead of the Haas of Romain Grosjean and the two Saubers of Marcus Ericsson and Felipe Nasr.
The session was cut short by over a minute after Hulkenberg’s wheel came detached from his car.
Q1 – Hamilton eliminated
Although the track was mostly dry for the start of the session, most drivers went out with intermediate tyres for their first runs, as there were still wet patches.
Manor drivers Pascal Wehrlein and Rio Haryanto went out on supersofts, however, a decision that proved to be a mistake as the German aqua-planned on the start/finish straight and crashed into the barriers.
Wehrlein’s car was damaged as a result, and the Manor driver – who had opened the DRS right before his spin – failed to set a time in the session, which was red-flagged five minutes in to recover his car and dry the puddle.
The stoppage lasted for 20 minutes before the action resumed.
When the session was restarted, all drivers went out with supersofts as Hamilton reported problems with his engine.
The Briton, already hit with a five-place grid penalty, failed to set a time after having to return to the pits due to a problem with his ERS.
He will start from the back of the grid.
The other drivers eliminated in Q1 were Renault duo Kevin Magnussen and Jolyon Palmer, who will start 17th and 19th, Haas driver Esteban Gutierrez (18th) and the Manor of Haryanto.
|2||Daniel Ricciardo||Red Bull Racing||1:35.917|
|6||Daniil Kvyat||Red Bull Racing||1:36.399|
|7||Sergio Perez||Force India||1:36.865|
|8||Carlos Sainz Jr.||Toro Rosso||1:36.881|
|9||Max Verstappen||Toro Rosso||1:37.194|
|10||Nico Hulkenberg||Force India||No time|
|14||Romain Grosjean||Haas F1 Team||1:39.830|
|17||Kevin Magnussen||Renault F1 Team||1:38.673|
|18||Esteban Gutierrez||Haas F1 Team||1:38.770|
|19||Jolyon Palmer||Renault F1 Team||1:39.528|
|20||Rio Haryanto||Manor Racing||1:40.264|
|21||Pascal Wehrlein||Manor Racing||No time|
|22||Lewis Hamilton||Mercedes||No time|