WHY WAS THEIR PLAYER SENT OFF?

Question:
Unusual incident occurred in my game yesterday.
My team were awarded a penalty kick when my player was tripped inside
the box.
The ball was on the spot and all the players were ready when the
linesman flagged to get the referee’s attention.
The ref goes over to talk and the linesman explains that my player was
offside before being fouled.

The ref accepts this and reverses his decision and awards our
opponents a free kick.

However, the ref still gives the defender a red card for tripping my
player!!

everyone was confused and everyone started to laugh…
what on earth is the rule on this?

Answer (April 28, 2014):
If the trip was done with excessive force—the only reason I can think of—then the referee was correct to send off the defender, no matter that your player had already violated Law 11. Old referee aphorism: The Laws of the Game were not meant to compensate for the mistakes of the players.