Kimi Raikkonen posted the fastest time ahead of teammate Sebastian Vettel, as Ferrari dominated the third and final practice session for the Malaysian Grand Prix ahead of qualifying later Saturday.
It was a reversal of Friday's second practice when Vettel was quickest ahead of Raikkonen.
However, Ferrari reported an electronic malfunction on Vettel's car and engineers changed the internal combustion engine as a precautionary measure. Vettel did not incur any grid penalty because it was the fourth engine change of the season — the maximum number allowed. Any more changes in the five races after Malaysia will incur penalties.
Red Bull's Daniel Ricciardo, who is in fine form with seven podiums in the past 10 races, was third — 0.211 seconds behind Raikkonen.
Mercedes was again short of its best form, with Valtteri Bottas fourth fastest ahead of Lewis Hamilton — more than half a second behind Raikkonen.
Hamilton leads Vettel by 28 points in the title race.
Mercedes had struggled badly in P2 on Friday, prompting concerns from both drivers and head of motorsport Toto Wolff.
P2 was marred by a heavy crash involving Romain Grosjean, who had a lucky escape after his tire caught an open drain and shredded completely, sending him spinning across the track at full speed into a barrier. The Frenchman walked away unscathed.
The loose drain was welded down overnight and there were no further problems.
"Just checking the drain; is it OK?" a concerned Grosjean said early into P3.
There was a small incident at the end when Red Bull driver Max Verstappen celebrating his 20th birthday and Renault's Jolyon Palmer had a minor collision and blamed each other. Verstappen was sixth.
Both were summoned by stewards, who ruled that neither driver was "predominantly to blame for the incident" and took no further action.