Referee Willie Collum has confirmed Rangers winger Daniel Candeias was sent off against St Mirren for making "gestures" to Buddies defender Anton Ferdinand.
The Ibrox club were left furious by the official's decision to show the Portuguese a second yellow card following a spat with the former West Ham centre-back during their 2-0 win in Paisley.
Gers boss Steven Gerrard insisted his player had done nothing wrong and branded the dismissal "embarrassing".
His club even tried unsuccessfully to have the red card overturned on the grounds of mistaken identity.
Scottish Football Association chiefs have now revealed the reasons for the failed appeal against the decision – explaining that Collum decided Candeias had to go after spotting the 30-year-old goad his Saints rival.
The flashpoint came seconds from full-time as the Light Blues celebrated Alfredo Morelos' injury-time strike.
Replays show Candeias – who had already picked up a booking for rushing towards the travelling support after scoring Gers' opening goal – running past Ferdinand while blowing kisses at the veteran stopper.
After a brief conversation with Saints keeper Craig Samson, the Rangers wideman was then approached by Ferdinand, who placed Candeias in a headlock before aiming a jab at his chin.
Collum immediately flashed yellow at both players – and then a red at Candeias.
In the written reasoning posted on the SFA website, Hampden chiefs say: "The referee provided a statement confirming the nature of the offence in respect of which the player was cautioned for a second time.
"He confirmed that he issued the caution to the player as at the time he believed that the player had been involved in two incidents, making gestures towards the opponent, the St Mirren No 35, after the scoring of a goal and becoming further involved with the opponent as he made his way upfield after celebrating the goal.
"The tribunal viewed the video footage of the incidents, supplied by the claimant, and carefully considered the claimant's written submission and the written statement of the player.
"Having done so, the tribunal found that the referee correctly identified the player as being the player involved in the incidents with the St Mirren No 35. The video footage showed this.
"The claimant, in their written submission, had accepted that there had been contact between the payer and the St Mirren No 35. The referee cautioned both players.
"Accordingly the tribunal found, on a balance of probabilities, that there had been no error on the part of the referee and no mistaken identity with regard to the players involved in the incidents and specifically in relation to the player for whom the claimant had appealed.
"Therefore the determination of the tribunal was that the claim be dismissed and that the caution and dismissal, and mandatory sanction, be reimposed."
Rangers boss Gerrard gave a stunned reaction as he watched a replay of the incident after the match.
"So Daniel gets a yellow card for that? Come on, lads. Be serious," he said. "The second yellow card is embarrassing. There is your evidence, that's what you're dealing with."
Candeias sat out the 7-1 win over Motherwell on Saturday through suspension while Rangers have also said they will be submitting a formal complaint over Collum's performance at the Simple Digital Arena.