The Mercedes pair were fastest overall at the end of the afternoon with Hamilton setting the pace and reveling in his form and his role as a settled senior member of the German outfit.
His speed, he said, showed he was in "a good place".
He said: "It really means a lot to me to feel that I am an integral part of this team and I love the huge energy that goes into the car and working with the engineers.
As he bids for his first Spanish Grand Prix triumph this weekend after three consecutive victories, Hamilton said he was aiming to grab the 34th pole of his career and make sure he can stay out of trouble with back-markers on a circuit where it is difficult to overtake easily.
More From This Section
"Pole is always important, but it is especially so here because it so difficult to get past people, especially those with a Mercedes engine!"
The morning session saw Rosberg, who leads the championship thanks to winning the season-opening Australian Grand Prix and then finishing second behind Hamilton three times, struggle with engine problems.
In the afternoon, however, Hamilton stayed on top, lapping nearly half a second faster than his Mercedes team-mate and showing that, in his second full season with the team after leaving McLaren, he is fully settled and fast.