Madrid, meanwhile, had to fight back from 2-0 down with 10 men to rescue a point in a 2-2 draw at lowly Osasuna, in a game which saw Gareth Bale taken off.

Following on from his first Barca hat-trick in the 6-1 demolition of Celtic in midweek, Neymar made the difference once more as he converted from the spot after Mario Gaspar had blocked Jordi Alba's cross with his hand.

Villarreal were level just three minutes after the interval when Mario Musacchio bulleted home a Manu Trigueros corner.

But Neymar had the final word as he smashed into an empty net from Alexis Sanchez's cut-back 22 minutes from time.

"Apart from the game against Atletico Madrid in the Super Cup, where we won a trophy, this is the game that has given me most satisfaction since I took over," said Barca boss Gerardo Martino.

"We have achieved a level of consistency in the last three games against Cartagena, Celtic and today that is pleasing.

"It was a great win for the manner in which we played and the quality of opponent we were facing rather than because Madid had dropped two points."

The hosts dominated the first-half in terms of possession but needed a penalty to open the scoring on the half hour mark when Mario handled inside his own area and Neymar coolly dispatched the spot-kick for his ninth goal of the season.

And it took the visitors just three minutes after the restart to level as Musacchio took advantage of some awful marking to head high past Jose Manuel Pinto.

But Villarreal goalkeeper Sergio Asenjo was left helpless when Sanchez latched onto Cesc Fabregas's pass behind the away defence and squared for Neymar to finish from close range.

Earlier, Madrid looked set for their third league defeat of the season after two headed goals from Oriol Riera put Osasuna 2-0 ahead inside 39 minutes.

Real's task became even tougher when Sergio Ramos was sent-off for two bookable offences moments later, but Isco halved the deficit a minute before the break to give Madrid hope.

Despite being in desperate need of a goal, Madrid coach Carlo Ancelotti substituted the in-form Bale just 10 minutes into the second period.

But after Osasuna were also reduced to 10 men following Francisco Silva's dismissal, Pepe headed home an equaliser 10 minutes from time.

"We lost a bit of control of the game after the first goal because we had played very well and with a lot of quality in the first 20 minutes," said Ancelotti.

"It was incredible to be 2-0 down with 10 men towards the end of the first-half given how we had played.

"The team showed great character and attitude to come back and draw the game."

The hosts went in front with virtually their first attack of the game as Marc Bertran's excellent in-swinging cross was met by the unmarked Riera at the back post.

Six minutes before half-time it was 2-0 as after Diego Lopez had made a fine save from Damia's header, Riera was on hand to nod into an empty net.

Things went from bad to worse for Ancelotti's men moments later when Ramos was harshly sent-off for the 18th time in his Madrid career after clashing with Roberto Torres in midfield.

However, Madrid were back in the game before the break when Cristiano Ronaldo ghosted past three Osasuna defenders and teed up Isco to blast an unerring finish into the bottom corner from 20 yards.

With his side failing to make much of an impression after the break, Ancelotti surprisingly withdrew Bale with over half an hour still to play as Angel di Maria replaced the Welshman.

The visitors had renewed hope when Silva dived in on Ronaldo and was rightly shown his second yellow card to make it 10 against 10.

And Madrid took advantage from the resulting free-kick as Pepe climbed highest to power Isco's cross into the bottom corner.