The day before the game, he shuts himself in his office, puts on some gentle music and thinks about his approach to the game. Where should they attack their opponents? What is the best way to dominate?
"I sit down and watch two or three videos," Guardiola says in his new book, Pep Confidential. "I take notes. That is when that flash of inspiration comes - the moment that makes sense of my profession. The instant I know, for sure, that I've got it. I know how to win. It only lasts for about a minute, but it's the moment my job becomes truly meaningful."
May 1, 2009 provided just such a moment. Having watched a previous match between Barcelona and Real, Pep noticed how much pressure Madrid's midfielders put on his players. He also noticed the tendency of defenders Cannavaro and Metzelder to hang back near Iker Casillas' goalmouth. This left space between them and the Madrid midfield.
It was 10pm and Pep was alone in his office. Everyone else had gone home. He sat in that dimly lit room imagining Messi moving freely across all that empty space in the Bernabu. He saw him face-to-face with Metzelder and Cannavaro, the two players frozen on the edge of the box, unsure whether or not to chase the Argentine. The image was clear and he picked up the phone and dialled Messi's number.
"Leo, it's Pep. I've just seen something important. Really important. Why don't you come over. Now, please."
At 10.30pm there is a gentle knock at Pep's office door and a 21-year-old Leo Messi comes in. The coach shows him the video, pausing it to point out the empty space. He wants his player to make that space his own. From now on, it will be 'the Messi zone'.
"Tomorrow in Madrid, I want you to start on the wing as usual, but the minute I give you a sign, move away from the midfielders and into the space I just showed you. The minute Xavi or Andrs Iniesta break between the lines and give you the ball I want you to head straight for Casillas' goal."
It was a secret between the two. Nobody else would know about the plans until Pep explained to Tito Vilanova the following day in the team hotel. Just minutes before kickoff, Guardiola took Xavi and Iniesta to one side and told them.
"When you see Leo in the space between the lines down the middle, don't hesitate. Give him the ball."
That day in May 2009, the strategy worked perfectly and Barca destroyed Real Madrid 6-2. Messi had become a false No 9.
Tiki-taka's pass master
Barcelona have long been associated with tiki-taka football but were said to take it to a new level under Pep Guardiola during his Bernabeu reign from 2008-12.
"I loathe all that passing for the sake of it, all that tiki-taka," he said. "It's so much rubbish and has no purpose. You have to pass the ball with a clear intention, with the aim of making it into the opposition's goal. It's not about passing for the sake of it.
"Be yourselves. You need to dig into your own DNA. I hate tiki-taka. Tiki-taka means passing the ball for the sake of it, with no clear intention. And it's pointless.
"Don't believe what people say. Barca didn't do tiki-taka. It's completely made up. Don't believe a word of it. In all team sports, the secret is to overload one side of the pitch so that the opponent must tilt its own defence to cope. You overload on one side and draw them in so that they leave the other side weak ... and then to hit them with the sucker punch. That's what our game needs to be. Nothing to do with tiki-taka."