Ferrari's Fernando Alonso headed Lewis Hamilton's Mercedes to set the pace in a rain-disrupted second practice at the Monaco Grand Prix.
The Spaniard beat Hamilton by 0.419 seconds in a frantic final 10 minutes of dry running after heavy rain disrupted the session.
Red Bull's Sebastian Vettel was third, 0.116secs behind Hamilton.
Toro Rosso's Jean-Eric Vergne was fourth from the Williams of Valtteri Bottas and Force India's Sergio Perez.
The Mexican's team-mate Nico Hulkenberg was seventh, with the McLarens of Jenson Button and Kevin Magnussen sandwiching Red Bull's Daniel Ricciardo in ninth.
"It was good to get a bit of dry running in the end," said Hamilton. "And it's good to see the others are close."
The session started with a soaking wet track after a downpour over the lunch break and the teams were reluctant to risk their cars.
Button was quickest in the wet by 0.15secs from Vettel, who was a similar margin ahead of Alonso.
BBC F1 analyst Allan McNish said: "Everybody was very circumspect, they were nervous about having any sort of damage.
"When it did dry, the three main contenders were up there - Alonso, Hamilton and Vettel, the three teams who are going to be fighting it out. But it is going to be very close in qualifying on Saturday."
Alonso was fastest with a spectacular lap on which the car was clearly dancing on the edge on a still-damp track on the super-soft tyres.
Other leading drivers were held up in heavy traffic on a crowded track but Alonso has looked fast all day - he was fourth in the first session behind the Mercedes drivers Hamilton and Nico Rosberg and Red Bull's Daniel Ricciardo.
Alonso's headline performance came on a day on which he has been at the centre of attention in the Monaco paddock, always a hotbed of gossip.
Ferrari released a statement after the first session, in which president Luca Di Montezemolo described him as "the best driver in the world".
That came after Alonso had said on Wednesday that he was pleased to hear Mercedes boss Dieter Zetsche has expressed similar views, but added that "from the side that is supposed to be close to you there are the opposite comments".
Alonso's team-mate Kimi Raikkonen had a problem early in the session that resulted in the car going into 'limp-home' mode and only managed four laps.