Hamilton was 0.029 seconds ahead of Piastri and expressed optimism for a more competitive weekend from Mercedes.
Charles Leclerc of Ferrari and Lando Norris of McLaren finished ahead of George Russell’s second Mercedes.
Fernando Alonso of Aston Martin was sixth fastest, while Max Verstappen of Red Bull looked to be having difficulty in 11th place.
Verstappen did not run on the soft tires, unlike most of the drivers in front of him, despite his complaints about his vehicle being “so loose over the bumps.”
About fifteen minutes remained in the session when it was momentarily red-flagged to clean some carbon-fibre debris left by it.