Sebastian Vettel topped the second free practice session for Formula 1's Bahrain Grand Prix, although what he called a "complete shutdown" of his Ferrari cost him running.
Vettel had earlier set the pace in first free practice and, after bolting on a set of fresh super-soft Pirellis shortly before the half-hour mark, set a time of 1m31.310s to top the floodlit second session.
This was despite saying he struggled with the brakes during the second half of the lap.
But early on in what was expected to be a long run to evaluate race performance, Vettel's car suffered what he called a "complete shutdown" over the radio.
Initially stuck in fourth gear and without power, he leaned forward to hit the neutral button in front of the cockpit.
That allowed the Ferrari to freewheel and was able to roll around the final corner before pulling over short of the pit entry after running out of momentum.
He was then given a push by marshals into the pit entry under yellow flags, which meant he could be recovered to the Ferrari pit with just over 35 minutes remaining.
Vettel returned to the track shortly afterwards, although he ultimately lost just over 15 minutes of running in the 90-minute session.
By then, the leading drivers had all completed their qualifying simulations, with Mercedes' Valtteri Bottas slotting into second place by 0.041 seconds shortly after Vettel went top.
Red Bull driver Daniel Ricciardo was third fastest and only 0.066s off Vettel.
Kimi Raikkonen was a tenth further back in the other Ferrari having had a new engine, MGU-H and turbo fitted after his problem in the first session.
Lewis Hamilton was only fifth in the other Mercedes, but his fastest lap was set on his third attempt at a qualifying simulation and left him 0.284s off the pace.
He aborted his first attempt and backed off after a big oversteer moment in Turn 1, and on his second try he ran off the track at Turn 10 after locking up trying to get around Nico Hulkenberg's Renault.
Hamilton was unhappy with Hulkenberg being in the way while on a slow lap, saying "these drivers are just so dangerous," over the radio. The stewards will investigate the incident after the session.
Hulkenberg ended up sixth fastest and just 0.573s off the pace, having set his time shortly before the incident.
That put him ahead of Felipe Massa and Max Verstappen, the latter suffering a floor problem that interrupted his running and compromised his ultimate pace.
Romain Grosjean and Daniil Kvyat rounded out the top 10, which was covered by 1.4s.
Fernando Alonso was the quicker of the McLarens in 15th, 1.587s off the pace, but team-mate Stoffel Vandoorne had a late start to the session.
After suffering an MGU-H problem in Friday's first session, McLaren opted to change his whole power unit - except for the battery and control electronics - to save time and he was able to get on track shortly after the halfway mark.
Vandoorne ended up slowest, having focused on long-run evaluation rather than going for lap times.
That put him just behind Carlos Sainz Jr, who pulled off at the end of the back straight after just 15 minutes with smoke emerging from his car, and Sauber driver Pascal Wehrlein, who is returning to F1 action after missing the Australian and Chinese GPs and completed 29 laps.
PRACTICE TWO RESULTS: