LIESTAL, Switzerland -- Lance Armstrong wrapped up his Tour de France preparations on a high note, finishing second in the Tour of Switzerland on Sunday, 12 seconds behind Frank Schleck of Luxembourg.

The seven-time Tour de France champion was seventh overall going into the stage, but surged into contention by placing 11th in the 16.6-mile time trial around Liestal, finishing in 33 minutes, 30 seconds to trail stage winner Tony Martin of Germany by 1:09.

Olympic time trial champion Fabian Cancellara finished second in the stage, 17 seconds back, while American David Zabriskie clocked the third best time, 29 seconds behind.

Lance Armstrong wrapped up his Tour de France preparations Sunday, finishing behind Franck Schleck, center, and ahead of Jacob Fuglsang, right. Pascal Pavani/AFP/Getty Images

Following bouts of illness and a crash earlier this season, Armstrong posted a strong performance in Switzerland, showing his 38-year-old legs are still able to compete in high mountains and produce a solid performance in time trials.

Armstrong escaped serious injury when he crashed at the Tour of California in May, but it was a big setback in his preparations for cycling's three-week showcase.

The cancer survivor made up for the race days he lost by competing in the Tour of Luxembourg, where he finished third, before racing in Switzerland.

Armstrong was pleased with his result heading into the Tour.

"I think if we look at the field here, on all levels, the climbers, the sprinters ... and the speed and compare it to the alternative race, this is what you'll see at the Tour," Armstrong said.

"For whatever reason, this race attracted all sorts of favorites, this is a good indication of what's coming up. I just have to stay healthy and try and find an extra 1 percent."

The American plans to scout four mountain stages of this year's Tour next week before heading to Rotterdam, Netherlands, where the race starts on July 3.

Following a 3½-year retirement, Armstrong struggled in time trials last year, a discipline in which he had excelled during his heyday.

He started slowly Sunday but rallied after the first seven miles, gaining ground on the long descent to the finish.

"It was a hard time trial, it was relentless, actually I had to drive all the way, there was no recovery apart from the downhill," Armstrong said after posting his best overall result since last year's Tour de France, where he finished third.

Team RadioShack director Johan Bruyneel said Armstrong's condition is improving.

"It's a shame to lose by 12 seconds, but if somebody had told me before the race that Lance would finish second, I would have signed for it," Bruyneel said. "We have to be very happy. His condition is satisfying. The biggest part of the job has been done."

Saxo Bank rider Jacob Fuglsang of Denmark finished third overall, 17 seconds back, while previous race leader Robert Gesink of the Netherlands dropped to fifth, 27 seconds adrift.

Schleck started the day fourth overall and secured the win by finishing 13th in the time trial, five seconds behind Armstrong.

"I surprised myself because I'm not a time trial specialist," Schleck said. "But with [my brother] Andy we did a specific work to improve in time trials and it paid off."

Schleck, also expected to contend at the Tour, dedicated his victory to fellow Luxembourg cyclist Kim Kirchen, who was still in an induced coma Sunday after a heart attack on Friday night.

"Me, Andy and my entire family we really hope that things will go better quickly," Schleck said. "My victory is for him."

Two-time Tour de France champion Alberto Contador, who didn't race in Switzerland, is favored to defend his title next month and Armstrong acknowledged this week it will be difficult to derail his rival's ambitions.

But his second place-finish gave him a major morale boost before the Tour, the only race that really matters to him.

"I was third in Luxembourg, second here, I'll do the math for the next race," Armstrong said.