Local favorites Movistar got a rousing reception after they battled through searing heat to earn a narrow victory in the Tour of Spain's opening team time trial on Saturday.

The win saw Spaniard Jonathan Castroviejo take the race lead while the overall favorites to win the Vuelta finished in a tight following group. It was Spain's first team time trial victory in a major tour in nine years.

The Pamplona-based Movistar team, greeted by some 15,000 fans who packed out the finish in the city's bullring, were seemingly unaffected by temperatures of about 40 Celsius.

Movistar completed the largely flat 16.5km course with a technical finish on narrow cobbled streets 10 seconds ahead of Dutch team Rabobank with Belgians Omega Pharma Quick-Step third.

BMC Racing finished a second out of the top three in fourth while Britain's Sky, featuring last year's Vuelta and Tour de France runner-up Chris Froome, were fifth at 12 seconds.

Danish outfit SaxoBank, with Spain's top contender Alberto Contador, were seventh at 14 seconds, while Russia's Katusha, led by 2012 Giro d'Italia runner-up Joaquim Rodriguez of Spain, were eighth at 15 seconds.

After Castroviejo and his team mates celebrated their win, the Spaniard told reporters it was purely chance that he had led the team across the finishing line in Pamplona's bullring.

"There was nothing decided beforehand, we just went for it flat out and I happened to be the one leading," the 25-year-old said. "Considering we lost two riders early on, to be able to win on home soil is a great result for the squad.

"I thought the margins would be far smaller, just one or two seconds, so we must have done something right to win by 10."

"We knew the route well, and that was a big help, and having the local fans cheering so loudly for us spurred us on too."

GREAT MONTH

Although his best previous result was a victory in the Tour de Romandie prologue in 2011, Castroviejo has been prominent in top racing in recent weeks.

In the Olympic men's road race, the Spaniard was a key player in the winning break and, after a ninth place finish in the London Games time trial, he finished sixth overall in the recent Eneco Tour in the Netherlands.

"It's turning into a great month of August for me," Castroviejo said. "I was called up at the last minute for the Olympics and did well there, and now I've got this result as well."

Contador said he was pleased to finish close to the other top riders in his first Grand Tour after completing a two-year doping ban.

"I felt good and that's really important. The team prepared this stage well. We can go back to our hotel feeling we've done a good job," he said.

"I'd like to thank the people who have been waiting out there for so long in the terrible heat to cheer us on. This wasn't a win but it's dedicated to them all the same."

Castroviejo will wear the leader's jersey in the second stage from Pamplona to Viana on Sunday, one of the few chances for the sprinters in a race with 10 summit finishes.

The Vuelta finishes on September 9 in Madrid.