Nico Rosberg edged Mercedes team-mate Lewis Hamilton in second practice at the Austrian Grand Prix.
Rosberg set his time in the seven minutes of running at the beginning of the session before a heavy downpour.
Hamilton recorded his lap in the final 10 minutes after the rain had abated and the sun returned.
There was just 0.019 seconds between them, with Force India's Nico Hulkenberg third from Ferrari's Sebastian Vettel.
Four-time world champion Vettel ended his session in the gravel trap at Turn Two with three minutes to go.
Vettel, who also has a five-place grid penalty this weekend for an unauthorised gearbox change, told his team over the radio: "I don't know what happened there. I just lost the car completely when I touched the brakes."
The car snapped suddenly sideways as soon as Vettel braked for the tricky uphill entry for a slow hairpin for which drivers are braking from more than 180mph.
After the session, Vettel said: "We had an issue with the brake distribution. It caught me by surprise. It didn't matter too much. Fortunately nothing happened."
Red Bull's Daniel Ricciardo was fifth fastest, ahead of Toro Rosso's Carlos Sainz, Red Bull's Max Verstappen, Ferrari's Kimi Raikkonen, Williams' Valtteri Bottas and the McLarens of Jenson Button and Fernando Alonso.
Englishman Jolyon Palmer was 16th for Renault, one place and half a second behind team-mate Kevin Magnussen.
It was a fractured session, with no running at all for a little more than half an hour after the rain - a torrential downpour - soaked the track in the Styrian mountains.
"It was a tricky day getting up to speed and getting laps out on track," said Hamilton. "It started coming together this morning but then the rain in the second session meant we had to adapt our programme.
"We didn't have any problems today, which is definitely a positive, and there's definitely more to come."
Although there were a few spins, including for Force India's Sergio Perez and Button, all drivers managed to tip-toe back to the pits on untreated slick tyres on the treacherous track.
But once the rain stopped, drivers did begin to venture out on the treaded intermediate tyres to learn about the new asphalt that has been laid on this track since last year.
Intermittent rain showers are predicted across the weekend.