Javi Gracia and Manuel Pellegrini have shared a lot, just not their phone numbers. Gracia was Villarreal’s youth team coach when Pellegrini led the first team to the semi-final of the Champions League; he is now the manager at Málaga, the club Pellegrini took to the quarter-finals two years ago; and as he talks about the ideals they pursued at the Madrigal, where he played and then took his first steps in an increasingly impressive coaching career, the admiration is clear. But Gracia admits they haven’t spoken lately.

Perhaps now Pellegrini could be forgiven for getting back in touch. Barcelona have won 15 of their last 16 games, scoring 56 goals before Saturday’s meeting with Eibar. They have lost only once: against Málaga at the Camp Nou three weeks ago. The question, of course, is how? Luck is not the answer. “You don’t go to Barcelona and get those stats just because,” Gracia says.

This is a different Málaga team to the one Pellegrini took to within seconds of the semi-final. It has been stripped of its assets, a dozen players were born in the 1990s, the pre-season target was survival, and of the starting XI from that game against Borussia Dortmund in April 2013, only Sergio Sánchez, Duda and Ignacio Camacho are still there – and Gracia admits that they could be gone too soon. But the stats are these: no one has a better record against Barcelona this season – one victory, one draw – and in two games against Málaga, Barcelona have managed three shots on target, and at Camp Nou, Málaga did not just defend and win, they had more chances too.

In the darkness under the stand at the city’s municipal athletics stadium where Málaga train, there is a warm-up track that doubles as a car park and at the far end is a small office where Gracia explains how, hands moving quickly, shapes and positions marked out on the table. “We knew that game would require a shift in style: more about counterattacking than positional attacking. We concluded there was no way our possession percentage was going to be higher than ‘x’, and that it would probably begin in this particular area,” Gracia says, marking out a territory deep in his team’s own half. “And from there, you begin: ‘We’re going to do this, this, and this. Messi will come at you from here, heading inside, so the movement has to be this ...’”

Gracia spends hours here and he has been through this before with the players, via videos, presentations and the training pitch. The squad and the staff speak highly of him, and not just publicly. Listening to him talk, dissecting and analysing the way he works, he is impressive. “Football is my life and my passion,” he says.

It is also one where the “communion” between players and supporters is vital. He wants them to be proud of his team, to identify, and he has succeeded. There is an optimism lacking last season under Bernd Schuster. A side who should have been fighting for survival are seventh (until Saturday’s round of matches) and targeting Europe. When they returned here after beating Barcelona, a thousand fans greeted them like heroes: the team who had faced Barça twice and emerged unbeaten.

Gracia says there were differences in the two games but there was a shared ideal: deny Barcelona space inside. “We knew their midfielders would play inside and that the full-backs would be practically wingers. So, what do we want? A midfield where the two wide men drop and it becomes virtually six at the back, which a lot of teams do? No, because then they have space inside. Instead we chose two lines of four: close together, narrow. We renounced width, leaving that space outside unoccupied.

“At home we played 4-3-3; away, we played 4-4-2. Both times we played narrow. The key difference is Messi. In the first game, he played inside and we accumulated players there, leaving a Barcelona player unmarked outside. In the second game, Messi started on the right, so we put four across the middle with Samu Castillejo aiding the full-back and alert to Messi. Forfeit the outside and be very strong in front of our area, so there’s no space, Messi can’t get running and they can’t break through the lines.

“With the greatest of respect, it’s not the same Messi getting the ball here and anyone else getting the ball here,” Gracia continues, signalling the territory on the “pitch” in front of him. “We could risk them crossing, as they’re a small team – especially in the first game when they didn’t yet have Luis Suárez.

“Ceding them the wings carries risks but the goal is here: that never changes. If they go out there, they’ll still have to come back in here. We abandoned that space outside and abandoned the [normal] idea of pressuring high. If we’re wide, they’ll find space inside. If we’re long, they’ll find space beyond. Everything moves; the one thing that doesn’t is the goal, the place they have to end up.

“That helped us attack too: those 60 or 70 metres to the other goal is space we appear to have renounced but have in fact created for us to run into. The way to the goal was speed: young, quick players. If you don’t have that, there’s no way out

“But,” Gracia says, “City have strengths that mean they can approach it another way. Maybe they don’t need to play so deep, or accumulate players. Maybe they can be a bit more open. Maybe they have an obligation to play differently, as a big club, and because of the first-leg result. But they won’t be thinking about scoring two; they’ll be thinking about the first step. They have a chance. They have great players and a manager I admire a lot.”