Sebastian Vettel went quickest in final practice for the Bahrain Grand Prix as Ferrari eclipsed rival Mercedes ahead of qualifying.
The German posted the best time of the session with a 1:31.683 lap on supersofts, finishing 0.040s ahead of teammate Kimi Raikkonen.
Vettel's time, however, was over six tenths slower than the benchmark set by Nico Rosberg yesterday.
The Mercedes driver settled for third position, four tenths behind Vettel, with teammate Lewis Hamilton down in fourth.
Valtteri Bottas completed the top five in the Williams, an impressive Romain Grosjean putting the Haas in sixth position ahead of the grid-deciding session.
Story of the session
Ricciardo was the first drive to register a time, 10 minutes in, as Jenson Button appeared to hit trouble right at the start of the session.
The McLaren driver, a surprising third yesterday, reported his engine was sounding different and returned to the pits, his mechanics starting work on the car straight away.
Although Button was able to return to the track quickly, teammate Stoffel Vandoorne was not so lucky, the Belgian's car suffering an oil leak that kept him in the garage for most of the session.
Sergio Perez soon relegated Ricciardo to second as the front-runners took their time to jump onto the track.
As it has been the norm this weekend, Rosberg needed just a single lap to move to the top of the times, 20 minutes into the session.
The German's 1:33.150 lap was matched by Hamilton, who set the exact same time a few seconds later.
The Mercedes duo were first outpaced by Bottas using the supersofts and a moment later by Raikkonen, who put the Ferrari on top with a run of softs.
The qualifying simulations kicked off with some 10 minutes to go, Rosberg immediately shooting to the top with a 1:32.104 on supersofts.
Hamilton again fell short and was less than a tenth slower than his teammate.
But Raikkonen put an end to Mercedes' dominance with his first run on supersofts, the Ferrari driver setting a new benchmark with the first lap of the session in the 1m31s.
Vettel made it a Ferrari one-two as he outpaced Raikkonen by 0.040s with less than seven minutes to go.
The session ended with a puncture for Renault's Jolyon Palmer, who had to drive slowly back to the pits.