(CNN) -- Lionel Messi scored his 91st and final goal of 2012 on Saturday as Barcelona enjoyed a comfortable 3-1 win over Real Valladolid at the Estadio Jose Zorrilla.
The Argentine forward's 60th minute goal -- courtesy of his trusty left boot -- doubled the league leaders' lead after Xavi had opened the scoring two minutes before halftime.
The home side halved the deficit in the 89th minute when Javi Guerra scored before Cristian Tello added a third for Barcelona in injury time.
The result leaves Barcelona nine points clear at the top of the table with 49 points from 17 games as La Liga heads into a Christmas break.
The win followed an announcement by the Catalan club on Saturday that coach Tito Vilanova had been released from hospital following an operation to remove a tumor from a salivary gland.
"Given a quick post-surgery recovery Tito Vilanova has been allowed to leave hospital on Saturday afternoon. The Barca coach was operated on Thursday according to plan," a statement from the club said.
The 44-year-old will now undergo a course of radiotherapy and chemotherapy.
Caretaker boss Jordi Roura, who watched Barcelona beat Valladolid, will continue in Vilanova's absence.
Real Madrid crashed to their fourth league defeat of the season at Malaga.
The reigning champions went down 3-2 at the Estadio La Rosaleda with all five goals coming in the second half.
Isco opened the scoring for the home side four minutes after the break before a Sergio Sanchez own goal made the scores level in the 66th minute.
But two goals in three minutes from substitute Roque Santa Cruz consigned Madrid to defeat.
The Paraguayan striker -- on loan from Manchester City -- tapped in his first in the 73rd minute after Joaquin had flicked on a Gamez cross before firing home again three minutes later.
Karim Benzema gave traveling fans hope when he pulled one back eight minutes from the end but Madrid's search for an equalizer went unrewarded.
The win takes Malaga -- who have been banned from playing in UEFA club competitions next season after falling foul of the European governing body's Financial Fair Play regulations -- to within two points of third-placed Madrid.
Elsewhere in La Liga, struggling Mallorca came from behind to beat fifth-place Real Betis at the Estadio Benito Villamarin.
Benat gave the home side the lead in the fifth minute before strikes from Victor on the half-hour mark and a 47th minute penalty from Javi Marquez sealed three points to lift Mallorca out of the relegation zone.
Granada also lifted themselves free of relegation trouble with a 2-1 win at fellow strugglers Osasuna.