MADRID, May 4 (Reuters) - MADRID, May 4 (Reuters) - Real Madrid fought their way back after a sending off and going a goal down to snatch a dramatic 2-1 victory at Osasuna and win their 31st league title on Sunday. With Villarreal beating Getafe 2-0 in an earlier match, Real had to win the game to take the title but suffered a major setback when defender Fabio Cannavaro was sent off at the start of the second half. Real looked to be in serious trouble when Osasuna midfielder Patxi Punal struck home from the penalty spot after Gabriel Heinze had handled in the area with eight minutes to go. But Dutch winger Arjen Robben equalised with three minutes to go, heading in after Gonzalo Higuain whipped a free kick into the area and the Argentine struck the winner when he lashed past Ricardo with a minute to go. With three matches left to play, Real have an unassailable 10-point lead over Villarreal at the top of the table.Earlier, Turkish striker Nihat Kahveci scored twice to give Villarreal a 2-0 victory at home to Getafe. Nihat put Villarreal ahead late in the first half when he side-footed in at the far post after fellow striker Giuseppe Rossi had sped down the left flank and slid the ball across the face of the goal. He took his tally for the season to 17 a minute before the break, having time to tee up his shot and pick his spot after Robert Pires had crossed the ball to the far post. Third-placed Barcelona hammered a beleaguered Valencia 6-0 at the Nou Camp, to record their first win in six games. Midweek defeat against Manchester United in the Champions League condemned Barca to a second successive trophyless season and they appeared stung by the criticism levelled at the team as they stormed into a 3-0 lead in under 15 minutes. Lionel Messi scored Barca's first goal in five games in all competitions when he opened from the penalty spot after he was brought down in the area by Alexis. Xavi made it 2-0 when he drilled in from 20 metres on eight minutes and Thierry Henry added a third by steering home after Samuel Eto'o cut the ball back from the byline. COOL FINISHING Henry scored his ninth of the season when he curled in from the edge of the area, after the break and Bojan Krkic wrapped up with two cool finishes after some dreadful defending from the Valencia back four. Valencia, who have lost five of their last six league games, remain just two points above the relegation zone. Real Murcia were relegated after they squandered a two-goal lead to lose 3-2 at Racing Santander and will now join Levante in the second division. Javier Clemente's side ended the game with nine men after defender Alvaro Mejia and Stephane Pignol were both sent off in the space of two minutes late in the second half. Racing's victory left them just two points behind fourth-placed Atletico Madrid and kept them in the hunt for the Champions League places. Spanish striker Daniel Guiza went to the top of the Primera Liga scoring charts when he took his tally for the season to 24 with his double in Real Mallorca's 2-1 win at Athletic Bilbao.