Casillas was whistled by Real's home faithful on Tuesday as a poor display saw him conceded four times in a 4-3 defeat.
Although the powers of the much-decorated keeper appear to be on the wane, Pepe has come out in defence of his colleague.
"Right now Iker is the best goalkeeper in the world and it's strange that somebody like him gets whistled," he told La Cope.
"Things were never clear when [Jose] Mourinho was here and I paid the price for saying Iker should be respected for what he has done for Spain. That was unfair.
"People forget what he's won and everything he's given to football and that was quite painful for me to see.
"When I came out and said he deserves respect it was taken as though I was his best friend and we then became everyone's enemy.
"Iker accepted the situation as best he could because he knows what it means to wear the Madrid shirt better than any of us and always defends the club."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.