Gilbert, who was overall leader for five days early in the race, won his second stage Friday after crossing the finish line in 5 hours, 43 minutes, 41 seconds. Tyler Farrar of the United States finished second in the same time.

“I have a big help from my team to take the position before the climb,” the Pharma-Lotto cyclist said. “And then there were some attacks from different riders but I stayed calm and focused everything on the sprint.”

Filippo Pozzato of Italy led a group of seven riders who were a second behind, including Nibali. The Liquigas-Doimo cyclist stretched his overall lead over Ezequiel Mosquera of Spain by 12 seconds for a 50-second lead going into Saturday’s difficult day.

“I knew it wasn’t going to be easy,” Nibali said.

The penultimate ride is 107 miles and ends with a grueling climb to an altitude of 7,372 feet at the Bola del Mundo in the Navacerrada mountains outside Madrid.

“I’m very relaxed. I will face a great adversary tomorrow,” said Nibali, who wears the overall leader’s red jersey with a time of 80:30:48. “I don’t know the climb (but) I’m not worried.”

Mosquera lost time after getting caught up in a melee when Frank Schleck suffered a flat tire about two miles from the finish line Friday.

“He was a lot faster than me. I didn’t have time to even take a breath over the last kilometer,” Mosquera said. “All I can say is that we’ll see how we regroup and I’ll attack.”