Sebastian Vettel edged out Lewis Hamilton in the second practice session at the Mexican Grand Prix after the Formula One world champion had set the pace earlier in the day.
Hamilton - who could lose his world title to Nico Rosberg this weekend if his team-mate wins and he fails to finish in the points or retires - maintained the momentum from his victory in Austin last weekend by setting the quickest time in P1 on Friday.
The Brit clocked one minute 20.914 on medium tyres, with Vettel second ahead of Ferrari team-mate Kimi Raikkonen on softs at the Autodromo Hermanos Rodriguez.
Rosberg, 26 points better off than Hamilton in the battle for the title, was only seventh in P1 and was expected to respond in the second session, but it was Vettel who recorded the fastest lap on a morale-boosting day for Ferrari.
The four-time world champion went to the top of the timesheets with a rapid circuit of 1:19.790 running on supersoft tyres and was not to be dislodged.
Hamilton had three attempts to topple the German, but the tables were turned as he missed out by only 0.004secs and Rosberg was 0.435secs off the pace in third spot.
The drivers struggled for grip in Mexico City and tyre supplier Pirelli said it will be easier to draw firmer conclusions with more rubber on the track on Saturday.
Raikkonen was fourth in P2, with Daniel Ricciardo fifth for Red Bull and his colleague Max Verstappen seventh after losing time and finishing 14th in the opening session due to a brake fire.
Debris on the track as a result of the right front wing of Felipe Nasr's Sauber disintegrating after he struck a kerb heavily led to a red flag in the P1, while Daniil Kvyat ended the day with smoke coming from his car after losing power.
Mercedes, Red Bull and Ferrari all looked strong on their long-run pace in the latter stages of P2 as an intriguing race weekend got under way.