Lopetegui's appointment as the successor to Zinedine Zidane was announced on Tuesday, much to the fury of Royal Spanish Football Federation (RFEF) president Luis Rubiales.
The 51-year-old was then sensationally sacked by Spain on the eve of the World Cup, with Rubiales claiming he had only been given the courtesy of a "20-second" conversation with Perez to discuss the move.
Lopetegui, who was tearful at his Madrid presentation on Thursday, was replaced by Fernando Hierro as Spain's coach for the tournament, having been unbeaten in his 20 games in charge during a two-year spell.
Perez, though, hit out at Rubiales and insisted Madrid did nothing wrong in their approach for Lopetegui, comparing his arrival to Louis van Gaal and Antonio Conte being appointed by clubs despite leading national teams to major tournaments.
"We made an agreement in just a few hours," Perez told the media. "An agreement to work together after the World Cup, respecting the clauses of his contract. We wanted to make this agreement quickly before the World Cup to make it transparent to avoid any speculation and rumours.
"There is no precedence that a manager agrees to become manager of a team after a competition and that agreement has somehow been interpreted as disloyal. If you think that this agreement is disloyal, well, that's not how we do things in the 21st century in Spain. It's not true at all.
"We had an agreement in a few hours and we wanted to make it transparent and clear in just a few hours time to prevent leaks that could damage the national team.
"I told the president of the federation, which both parts had to agree. We had the legitimate freedom to make this agreement, it seemed all normal, and we thought there was going to be a press conference between the president of the federation and Julen Lopetegui, but it turned out to be a reaction of pride from the president who disrespected Real Madrid.
"The president of Spanish football gave a response that is unprecedented. Conte, Van Gaal and dozens of managers have decided to move on before or during competitions, but Real Madrid are proud to have been able to contribute to the success of the national team.
"That's why it's very important to be unified and to be able to grow and be the most respected and loved club in the world. We need to work together against those who love to destroy our image. I don't want to be the victim but we need to come together against this wave of anti-Madridismo, especially when we're having one of the best moments in our history."
61 - Spain scored at least one goal in every game they played under Julen Lopetegui, netting 61 goals in total (an average of 3.05 per game, 20 games played). Fired. pic.twitter.com/DrHCtq2lVX— OptaJose (@OptaJose) June 13, 2018
Perez reiterated his confusion at Rubiales sacking Lopetegui and not allowing the coach to lead Spain into the World Cup, with senior players having reportedly lobbied for him to remain in post.
"We are hugely surprised and we still can't believe or understand why this agreement would affect players who are totally committed to being world champions again," Perez added.
"They are hugely professional players and this agreement would not affect their effectiveness – there is nothing that justifies Julen Lopetegui not being on bench for tomorrow's game [against Portugal]. We are sorry he couldn't fight for this huge desire to make Spain world champions.
"We have the satisfaction of having a great manager, we want to continue making history together. He is a man fulfilling one of his dreams and it's a huge challenge that not many people get to face."