Carlos Sainz took top spot ahead of Ferrari team-mate Charles Leclerc.