THE DECISION
The referee stops play, cautions (yellow card) the defender and awards a direct free kick to the attacking team as the foul has occurred before the offside offence. The referee could not allow play to continue because the attacking team could not benefit from the advantage in this situation as their team-mate was offside.
Read official Law 11 ↗