Sebastian Vettel ended Formula 1 pre-season testing at Barcelona with the fastest lap time, set before Ferrari and Red Bull lost out on valuable track time in the afternoon session.
Vettel completed 110 laps before stopping around 90 minutes into the afternoon session at the exit of Turn 2, similar to the position in which Kimi Raikkonen's Alfa Romeo pulled off at the end of the morning's running.
Ferrari confirmed later in the afternoon that an "electrical issue" had caused Vettel to stop and the fix would take too long for him to return to the track.
It continued a run of Ferrari problems after Vettel's crash on Wednesday meant team-mate Charles Leclerc could do just one lap that afternoon, and Leclerc had lost time earlier in the week to a cooling system check.
But Vettel's lack of track time was not enough for him to lose the top spot in the final day of testing, as Mercedes' Lewis Hamilton fell narrowly short of wrestling the fastest lap from his 2017/18 title rival.
Hamilton progressively climbed up the timesheets after taking over from Valtteri Bottas for the afternoon.
He initially made small improvements on Pirelli's unmarked compound before switching to the faster C4 and C5 tyres.
Hamilton's first flyer on the C4 was good enough for sixth before finding further time to jump to third with a 1m16.628s effort.
A switch to the C5 tyre allowed the Mercedes man to go second, before he then lapped in 1m16.224s just before the final hour in a time that was just 0.003s short of Vettel's benchmark.
Hamilton was able to complete 61 laps, over double Max Verstappen's total of 29.
Verstappen missed just half an hour of running in the morning following Pierre Gasly's huge crash on Thursday before Red Bull identified an gearbox issue that meant the Dutchman did not run in the afternoon.
Red Bull's lack of running was compounded by Mercedes completing 132 laps across its both drivers, with Valtteri Bottas taking third with a best effort of 1m16.561s on the C5 tyre.
Renault's Nico Hulkenberg was fourth after completing the majority of his early running on the harder compounds and a switch to red-walled tyres meant he could set a best of 1m16.843s on the C5 late on.
Toro Rosso's Daniil Kvyat was fifth for Toro Rosso which, like sixth-placed McLaren driver Carlos Sainz Jr, focused on longer runs in the afternoon.
Romain Grosjean was able to complete 73 laps in an improved showing after an exhaust issue cost Haas time on Thursday, lapping a best time of 1m17.114s on the C5 tyre in the morning.
That put him ahead of Daniel Ricciardo and Alfa Romeo's Raikkonen, who completed the most laps of anyone with 132 laps after his morning stoppage.
Haas's Kevin Magnussen was another driver to prioritise longer runs in the afternoon but caused a red flag inside the final 15 minutes of the session when he stopped at the exit of Turn 4.
Sergio Perez was 11th, behind Magnussen, but enjoyed his highest amount of mileage in a single day with 104 laps completed.
Williams's Robert Kubica was last on the timesheets and was over a second behind Perez's best time on the same C5 tyre.
Friday test times
|5||Daniil Kvyat||Toro Rosso/Honda||1m16.898s||0.677s||131|
|6||Carlos Sainz Jr.||McLaren/Renault||1m16.913s||0.692s||134|
|9||Kimi Raikkonen||Alfa Romeo/Ferrari||1m17.239s||1.018s||132|
|11||Max Verstappen||Red Bull/Honda||1m17.709s||1.488s||29|
|12||Sergio Perez||Racing Point/Mercedes||1m17.791s||1.570s||104|