Torrential rain hit the track a few minutes before the start of FP2, which led to the session being delayed by 15 minutes.
It was still heavily raining when it went to green, and only Alex Rins and Johann Zarco went on track during the first 10 minutes.
The former could only do a 1m50.456s, more than 26 seconds off Andrea Dovizioso's FP1 benchmark, and soon pitted, but Zarco stayed out and did several laps on track.
The rain soon abated and Zarco gradually improved his time, going below the 1m40s barrier at halfway point of the session.
With more and more riders joining the track, Aprilia's Scott Redding soon took over the lead, gaining time lap by lap in the slowly improving conditions.
The Briton's best time was a 1m34.538s when he pitted with 13 minutes to go but he was quickly demoted by Marquez.
The championship leader went faster with a 1m33.995s soon afterwards just before heavier rain started to fall again, denying the field from further improvement.
Redding ended up second, 0.543s behind Marquez, followed by the three Ducati GP18s of Danilo Petrucci, Jorge Lorenzo and Andrea Dovizioso.
KTM's Bradley Smith took an impressive sixth, beating Suzuki's Rins by 0.015s.
Jack Miller (Pramac Ducati) in eighth was more than two seconds off the pace as the top 10 was rounded out by Cal Crutchlow (LCR Honda) and Valentino Rossi (Yamaha).
With nobody able to improve on their FP1 times, Rossi's 11th place from the morning session means he is set to take part in the first part of qualifying if FP3 on Saturday morning is also affected by rain.
The Yamahas of Zarco and Maverick Vinales were only 15th and 20th, while Dani Pedrosa was 23rd and last, 5.9s adrift.
Franco Morbidelli (Marc VDS Honda), 13th fastest in FP2, has been given a three-place grid penalty for "irresponsible riding" and impeding Aleix Espargaro's Aprilia at Turn 2 in first practice.
Second practice results: