LE MONETIER-LES-BAINS, France — Andy Schleck led a daring attack in the Alps to win the 18th stage of the Tour de France on Thursday, putting him within seconds of the yellow jersey and quashing Alberto Contador's hopes of a fourth title.

France's Thomas Voeckler, in a show of grit of his own, narrowly kept the lead by muscling up a punishing final climb to limit the damage at the end of the 125-mile trek from Pinerolo, Italy, to the Galibier Serre-Chevalier ski station in France.

Contador started the stage trailing Voeckler by several minutes after a rough start to the three-week race and finished it with a dismal final climb.

"Victory is impossible now," he said. "I had a bad day. My legs didn't respond and I just hit a wall. It was a very difficult day right from the start."

Schleck began the day in fourth place and is now 15 seconds behind Voeckler. He attacked on the second of three grueling climbs and held on all the way on the fabled Galibier pass to the highest-altitude finish in the race's 108-year history.

"I told the team yesterday that I had this in mind. I wasn't going to be fourth in Paris," Schleck said. "I said I'd risk it all. ... It's my character: I'm not afraid to lose."

Standing next to Schleck, Voeckler — who has repeatedly insisted that he can't win when the race finishes Sunday in Paris — said: "You'll get it."

Frank Schleck was second Thursday, trailing his brother by 2 minutes, 7 seconds. Cadel Evans of Australia was third. Voeckler was fifth on Thursday, 2:21 behind. Frank Schleck is third overall, 1:08 back. Evans is fourth, 1:12 off the pace.

Contador was the day's biggest loser, trailing in 15th place — 3:50 behind. Overall, he trails the French leader by 4:44 in seventh place.

"Please, let me breathe," an exhausted Voeckler said at the finish, mustering the strength to raise a fist in joy once he saw he'd kept the yellow jersey. "At 2,650 meters, the oxygen is thin."

"I limited the damage," he added. "I went all out."

Schleck, the Leopard Trek team leader, came in knowing that he would need to gain time on rivals ahead of Saturday's time trial — a discipline that's not his specialty.

On Friday, the pack faces the last of three days in the Alps. It again features an uphill finish at the renowned and dreaded Alpe d'Huez.

Ahead of the stage, Contador tweeted in Spanish about "What leg pain!" awaits on three climbs so tough they defy cycling's rating climbs: Col d'Agnel, Col d'Izoard and Col du Galibier.

The pack scaled more than 37 miles of total climbs, about one-third of which had a gradient of more than 9 percent. Tour director Christian Prudhomme called the 15-mile Col d'Agnel (9,000 feet) the hardest climb in this race.

Agnel, the day's first big climb, wasn't the site of the showdown. At one point there, Contador drifted back to the race doctor.

"The start of the stage didn't get off well," he said. "I had to drop back to the medic car for an anti-inflammatory."

Andy Schleck took his chance on Col d'Izoard. After riding behind Leopard Trek teammate Stuart O'Grady, the Luxembourg rider sped from the main pack about midway up, with 13 breakaway riders ahead.

Contador moved up to the front of the pack but didn't chase. Neither did Voeckler or Evans, possibly a tactical error that could cost them victory in Paris on Sunday.

The stage showed how teamwork and strategy can be essential. Leopard Trek sent out two riders in the breakaway so they'd be available to escort Schleck in case he could shake his rivals.

He did. With 34 miles left in the stage, Schleck jumped out to a lead of more than a minute against the contenders and caught his teammate Joost Posthuma, one of the breakaway riders who welcomed Schleck into his wake to go up Izoard.

With less than 20 miles left, nearing the foot of the final climb, Schleck and four other breakaway riders caught Maxim Iglinsky of Kazakhstan, who had ridden solo at the front for much of the stage.

At the foot of 14-mile Galibier ascent, Schleck and the five others in the breakaway had extended its lead to 3½ minutes ahead of the pack.

With more than six miles to go, Schleck was continuing to gain time and was ahead by nearly 4½ minutes. Evans then attacked the pack, but his speed wasn't enough to erase the gap of more than a minute.

With about five miles left, Schleck was alone with Iglinsky close on his rear wheel. But he moved away from the Kazakh to ride alone, gritting his teeth and spitting water slurped from his bottle.

Friday's Stage 19 features two more "beyond category" climbs. They are up the other side of the Galibier, which wasn't covered Thursday, and the finish at the Alpe d'Huez after a 68-mile trek from Modane.

A key question is whether Andy Schleck's fatigue could give an opening to Evans, who many think could be his biggest threat.

"I crossed the line and I had gone all out for every second," said Schleck, his neck bundled in a post-race towel to protect him from mountaintop cold. "I haven't hurt like this in a long time."

And, despite Contador's insistence, Schleck won't discount the Spaniard.

"He's not out of the race, but we see clearly that he's beatable," he said.

Evans said he "couldn't control" such an early attack like the one by Schleck, and was baffled by the pace of the Luxembourg climbing star and the rest of the lead bunch.

"They really rode fast at the front, I don't quite understand how they made so much time," the Australian said.

The pace was such that more than half of all riders finished so far behind Schleck that they would normally have been disqualified. But Tour organizers invoked a rule that allowed them to keep competing with a penalty.

The penalty lopped off 20 points from the stragglers in the competition for the green jersey for best sprinter. Britain's Mark Cavendish saw his tally fall to 300 points — just 15 ahead of Jose Joaquin Rojas of Spain.

Evans said he's looking toward the time trial, which is more a specialty for him than the Schleck brothers.

"It was always going to be crucial, but as long as we are within one or two minutes of each other — such a hard time trial — there can be big gaps if you arrive there a little less fatigued than those around you."