GAP, France — Portuguese rider Rui Costa won the 16th stage of the Tour de France, and Chris Froome maintained his healthy lead over Alberto Contador as both survived a downhill scare Tuesday.

Costa broke away on the last climb of a hilly trek to secure the second stage win of his Tour career, crossing the line 42 seconds ahead of Christophe Riblon.

"I knew exactly what I had to do, and every second that I gained going uphill were useful at the end," Costa said through a translator. "I had enough strength to hold on."

In the sprint for second place, Riblon beat Arnold Jeannesson, Jerome Coppel and German veteran Andreas Kloeden.

Froome and Contador finished more than 11 minutes behind Costa, who is not considered to be a contender for overall victory.

About halfway up the day's final climb, Contador attacked, but Richie Porte responded and got Sky teammate Froome back on Contador's wheel.

Contador attacked again soon after and opened up a gap of about 50 meters (yards) before being caught. Contador then tried a third attack and Porte had to drop off, leaving Froome to do the work.

They got to the top together, but going downhill proved even more eventful.

On the descent, they were both in difficulty on a sharp right turn as the Brit chased the Spaniard.

Froome went off the left side of the road and had to plant his left foot on the ground to stop from toppling off as his right leg wheeled up into the air. Contador also lost balance and hit his knee on the ground before quickly jumping back up on the bike.

Contador said after that he was unhurt, but Froome blamed him for the incident.

"In my opinion it was a bit dangerous from Alberto to ride like that, it's not good," Froome said, criticizing the aggressive attitude of both Contador and Saxo-Tinkoff teammate Roman Kreuziger. "They attack uphill and they attack downhill. It's always difficult."

Bauke Mollema could have gained more time but chose instead to wait for Froome and Contador. Mollema remains second overall, 4:14 behind Froome, while Contador remains 4:25 back in third.

Froome will look to extend that lead in Wednesday's time-trial — one of his favored disciplines. After that there are three huge mountain climbs in the Alps.

"We have three or four big days left before Paris, but the time-trial will be very tough with two climbs and two descents," Froome said.

The stage started from the Provence village of Vaison-la-Romaine in the heart of Rhone winemaking country, and featured several medium-difficulty climbs along the 168-kilometer (104-mile) route to the Alpine town of Gap.

Early on, about 25 riders started to pull away, including Thomas Voeckler, Philippe Gilbert and Jan Bakelants — all Tour stage winners.

The group started to split apart up the Col de Manse, a 9.5-kilometer (6-mile) ascent and the last of the day's three moderate climbs, and where Costa surged ahead. He also won a climb up to Super Besse ski station in 2011.

"This win will make us happy," said Costa, whose teammate Alejandro Valverde dropped out of podium contention last week when he lost major time on Friday's 13th stage after stopping for a mechanical failure. "It's my victory, but it's also a victory for the team."

Also, 2011 champion Cadel Evans' miserable Tour continued as he was dropped on the last climb.