Lionel Messi (right) vies with Valladolid's midfielder Oscar Gonzalez during the Spanish league match in Valladolid. Photo: AFP
Lionel Messi polished off his record year with his 91st and final goal of 2012 in Barcelona's 3-1 win at Valladolid on Saturday
Messi scored in the 59th minute by dribbling between a defender's legs, before making it 2-0 after Xavi Hernandez had opened the scoring two minutes before halftime, in a victory the team dedicated to ailing coach Tito Vilanova.
Players from both teams wore T-shirts before the game with messages of support for Vilanova, who had throat surgery on Thursday to remove a second tumour in two years from a saliva gland.
Barcelona was coached by assistant Jordi Roura, with Vilanova being released from hospital just moments before the game. He is expected to undergo around six weeks of chemotherapy and radiotherapy.
"This win is for Tito," said Barcelona defender Dani Alves. "It's a surprise and joy that he is home now. We are here to help him any way he can. Football is secondary now, he is fighting for his life."
Barcelona remained perfect in nine away games and extended its record league start with a 16th win in 17 rounds.
It restored a nine-point lead over second-place Atletico Madrid, and saw the gap over Real Madrid grow to 16 points after the slumping titleholders lost 3-2 to Malaga.
"We aren't celebrating anything yet," said Dani Alves. "We will do that when we reach the end of the season."
Real Madrid coach Jose Mourinho's decision to bench goalkeeper Iker Casillas backfired against Malaga as Real dropped further off the pace in the title race.
Mourinho made the startling decision to bench Casillas and replace him with second-choice goalkeeper Adan Garrido.
The change proved costly after Madrid failed to convert its overwhelming dominance in the first half, and Malaga emerged from halftime a different side.
Malaga forward Francisco "Isco" Alarcon opened for the hosts in the 49th with a vicious right-footed shot from the edge of the area that Adan couldn't touch.
Madrid levelled in the 66th through an own goal by Sergio Sanchez, but Malaga's Joaquin Sanchez set up substitute Roque Santa Cruz for two goals in the 72nd and 76th to guarantee the win despite Karim Benzema's goal for Madrid in the 82nd.
The victory pulled fourth-place Malaga to within two points of Madrid in third.
Also on Saturday, Mallorca won 2-1 at Real Betis, escaping the relegation zone and breaking a dire run of 11 league games without a victory.
Meanwhile, Real Zaragoza earned its fourth away win this season by beating Athletic Bilbao 2-0.