Match ends, Barcelona 0, Málaga 1.
Barcelona missed the chance to go top of La Liga as they suffered a shock home defeat to seventh-placed Malaga.
Juanmi scored the seventh-minute winner following a Dani Alves mistake as Barcelona's 11-match winning run ended.
A second home league defeat of the season means Barcelona stay a point behind Real Madrid.
And it was far from ideal preparation for the Catalans' visit to Manchester City next Tuesday for the first leg of their Champions League last-16 tie.
Barcelona had scored 42 goals during their recent winning run - with top scorer Lionel Messi contributing 10 goals in his last five league games - but could not find one to cancel out Juanmi's early strike.
Alves inadvertently created the chance with a weak backpass to goalkeeper Claudio Bravo, which the 21-year-old intercepted to take the ball around the keeper and slot into the empty net for his fifth goal of the season.
The goalscorer almost made it 2-0 on the break with a shot that was saved by Bravo, before Barcelona piled on the pressure in the second half.
But despite dominating possession they were unable to create any clear-cut chances and overhaul Real Madrid who play at Elche on Sunday.
Having drawn 0-0 in the first league meeting of the season between the sides last September, Malaga became the first team since Getafe in 2007/08 to keep Barcelona scoreless over two games.
Barcelona coach Luis Enrique:
"We're used to these kind of games.
"I'd like it to be an accident but it is becoming habit, the opposition close up and we can't find a way through.
"These kind of results are sometimes a good reminder that other sides have their qualities.
"You could consider this a deserved defeat."
- 22Alves da SilvaSubstituted forMascheranoat 73'minutes
- 3PiquéBooked at 79mins
- 18AlbaBooked at 90mins
- 12RafinhaBooked at 12minsSubstituted forRakiticat 63'minutes
- 8IniestaSubstituted forPedroat 67'minutes
- 11NeymarBooked at 87mins
- 1ter Stegen
- 3Pena de OliveiraBooked at 49mins
- 10Ricardo HortaSubstituted forBarbosa Valenteat 79'minutesBooked at 90mins
- 14García del PozoBooked at 62mins
- 29Castillejo Azuaga
- 7García SánchezSubstituted forBokaat 85'minutes
- 11JuanmiSubstituted forAñor Acostaat 50'minutes
- 9Guerra Rodríguez
- 17Barbosa Valente
- 28Añor Acosta
- Juan Martínez Munuera
- Shots on Target
Second Half ends, Barcelona 0, Málaga 1.
Foul by Ivan Rakitic (Barcelona).
Duda (Málaga) wins a free kick in the defensive half.
Attempt saved. Gerard Piqué (Barcelona) right footed shot from the centre of the box is saved in the bottom left corner. Assisted by Lionel Messi with a through ball.
Attempt saved. Luis Suárez (Barcelona) right footed shot from the right side of the box is saved in the bottom left corner.
Duda (Málaga) is shown the yellow card.
Jordi Alba (Barcelona) is shown the yellow card.
Foul by Jordi Alba (Barcelona).
Juanpi (Málaga) wins a free kick on the right wing.
Javier Mascherano (Barcelona) wins a free kick in the defensive half.
Foul by Roberto Rosales (Málaga).
Attempt blocked. Arthur Boka (Málaga) left footed shot from the left side of the box is blocked. Assisted by Recio.
Neymar (Barcelona) is shown the yellow card for a bad foul.
Foul by Neymar (Barcelona).
Sergi Darder (Málaga) wins a free kick in the defensive half.
Substitution, Málaga. Arthur Boka replaces Samuel.
Attempt missed. Pedro (Barcelona) right footed shot from the right side of the box is close, but misses to the right. Assisted by Neymar.
Neymar (Barcelona) wins a free kick on the left wing.
Foul by Samu Castillejo (Málaga).