Míchel's side dealt an unexpected blow to Barcelona's title challenge at La Rosaleda on Saturday night with a solid performance that caught the favourites on the counter-attack to yield two goals for the underdogs.
The game began predictably with the visitors enjoying most of the possession and Malaga giving the ball away on the few occasions they had it. Malaga keeper Carlos Kameni was forced into action in the 13th minute, to acrobatically block a Hernández own goal, as the visitors applied pressure in the home side's penalty area early on.
Just two minutes later, Kameni made another impressive save in a one-on-one with Luis Suárez to deny the striker from putting Barcelona ahead with their first shot on target.
As the first half progressed, the visitors continued to dominate while Malaga struggled to keep the ball. However, Barcelona were unable to profit from their possession as Neymar and Suárez found it difficult to contend strong challenges from centre half Llorente and right-back Rosales in the final third. Neymar's corners were also of little threat and Messi's free kicks were either the wrong side of the cross bar or blocked by the wall. Nevertheless, for the first 30 minutes the visitors were undoubtedly the stronger side.
However, Malaga's defensive game plan paid off in the 31st minute in one of their many counter-attacks. A very well-placed long ball from left-winger Juankar, who was deep into his own half, found a sprinting Sandro, who cooly tucked the ball past keeper Ter Stegen and the home side's first shot supplied their first goal.
The goal seemed to provide a boost in confidence for the underdogs as the last 15 minutes of the first half saw more attacking play, with skipper Camacho and central midfielder Juanpi creating a significant threat in the opposition's half. In addition, Kameni and his defence remained effective in frustrating Barcelona's sterling strike force each time they fought for an equaliser.
As the teams returned from the break, Luis Enrique hoped the introduction of Iniesta and Sergi Roberto for Mathieu and Denis Suárez would bring a more successful 45 minutes for his side. However, in the first 15 minutes, much of the play resembled that of the end of the first half, with Barcelona holding the ball but Malaga unsettling Mascherano and Umtiti in the Barcelona defence on the counter-attack.
As the half unfolded Barcelona continued to unnerve the home fans as they pressed for the equaliser. However Messi continued to squander free kicks, one just 20 yards out, and Suárez and Neymar were unable to compensate as their shots rarely challenged Kameni. When the latter was dealt a second yellow for a poorly timed tackle on Llorente in the 65th minute, a Malaga win was suddenly looking very likely.
The home side thought they had the deal sealer in the 71st minute, but substitute striker Peñaranda's goal was unfairly ruled offside. However, after a good chance for Charles was easily held by Ter Stegen, in the 89th minute Jony proved a good replacement for Juankar as he scored the hosts' second goal after being nicely set up by Fornals.
The hugely unanticipated final result means that Malaga, the only side in La Liga to achieve two clean sheets against the Catalan giants this season, find themselves nine points clear of the relegation zone while Barcelona's title challenge at the opposite end of the table has not become any easier.