Nawaf Shukralla meant well, of course. The Bahraini referee in the middle for the biggest match of his career, wanted to get the injured player back on the pitch as quickly as possible to restore balance between Poland and Senegal.
Waving M'Baye Niang back onto the pitch, Shukralla made an error that nine times out of 10 would not even be noticed. This time, though, his trigger whistle combined with Polish incompetence to present Senegal with a goal that turned out to be the winner.
The referee's mistake was in allowing Niang back on too soon. He heeded the screams and shouts of the Senegal bench - and probably his 4th official - to allow him back on quickly, while the action was in a neutral part of the pitch.
Referees are taught not to allow players back on either until the ball goes out of play or when play is in the player's own half.
Shukralla, in his defence, can argue that play was indeed in Senegal's half when he waved Niang back on. But he didn't anticipate what was going to happen, that play can break so quickly.
Also, he should have resisted pressure on him to allow Niang back on, until play enters a "safe" time when the referee's decision will not result in the threat of a goal - at either end of the field.
It's very sad when a well meaning error comes back and bites a ref. His intention was good, it's just that he jumped a little too quickly.
Another ref who's probably on his way home now.