Updated

Barcelona, Spain (SportsNetwork.com) - Barcelona saw its 31-match unbeaten streak in home La Liga games come to an end on Saturday as it suffered a shock 3-2 loss to Valencia at Camp Nou.

The club last tasted league defeat on home soil in a 2-1 loss to Real Madrid on April 21, 2012. The Catalans entered the match on a 25-game league winning streak at home in La Liga play, but a second-half strike from Paco Alcacer on Saturday ended that run, opening the door for Atletico Madrid to move into sole possession of first place with a win against Real Sociedad on Sunday.

Barcelona had made a bright start to Saturday's affair when Alexis Sanchez latched on to a low cross in the seventh minute to chip home the opener from a tough angle.

The home side held the lead until the closing moments of the first half when Sofiane Feghouli picked out Daniel Parejo with a square pass, allowing the Valencia midfielder to tuck home the delivery from close range.

Valencia managed to get in front just two minutes into the second half when Pablo Piatti looped an awkward header over the head of Victor Valdes and into the back of the net, but Barcelona managed to get back on equal terms in the 54th minute when Ricardo Costa's hand ball resulted in a penalty kick for the home side, which Lionel Messi buried with confidence.

The two sides were level for only five minutes as Valencia turned up with the winner just before the hour mark. Feghouli was the architect once more as his low cross was met by Alcacer, who hammered a shot underneath Valdes for his second league goal of the season.

The win, Valencia's first in three La Liga contests, helps the club improve to 28 points, 16 points back of Barcelona. Gerardo Martino's side can drop to as far as third place in the Spanish top flight should Atletico and Real Madrid claim maximum points Sunday.

Elsewhere in La Liga action, Malaga squandered a halftime lead but ultimately claimed three points in a 3-2 defeat of Sevilla at La Rosaleda on Saturday.

A penalty from Duda gave the home side the lead heading into the break, but goals from Carlos Bacca and Federico Fazio tilted the edge in Sevilla's favor. Samuel equalized for Malaga in the 77th minute, and Duda struck six minutes later to snap a four-game winless run and lift the club to 24 points on the season.

Also on Saturday, Levante was held scoreless by Rayo Vallecano in a 0-0 at the Ciutat de Valencia and Getafe played to a 0-0 draw with Valladolid.