David Beckham has had the red card he received in Real Madrid's defeat to Valencia on Sunday rescinded.
The England captain was booked for dissent and received a second caution for applauding the referee.
The club appealed, claiming that Beckham's behaviour had been neither "scornful nor sarcastic".
The Spanish Football Federation decided that the clapping formed part of his initial protest at a decision and did not warrant a second yellow card.
The 30-year-old will now be free to play for Real against Deportivo la Coruna on Wednesday.
Beckham was dismissed in the 87th minute of Real's 2-1 defeat to Valencia, a result which meant they missed the chance to go top of La Liga.
In his post-match report, the referee noted that Beckham had behaved in "a mocking way after being reprimanded".
However, the Competition Commission, which heard Real's appeal, concluded that Beckham was not being confrontational.
"The clapping took place when the player's back was turned to the referee and when he was returning to his position on the pitch," it said.
"Although the action is worthy of reproach it was not done in direct confrontation and is seen as part of his original protest.
"Neither the incidents themselves nor the referee's report suggest that there was an intention to insult the referee."