What is the offside rule in football?
A player is offside if, at the moment a team-mate plays the ball to them, they are in the opponents' half and closer to the opponents' goal line than both the ball and the second-last opponent — and they then become involved in the play.
The second-last opponent is usually the last outfield defender, because the goalkeeper is normally the last. That is why the rule is often described as being "behind the last defender", which is a useful shorthand rather than the actual wording.
Three things people commonly get wrong.
Position alone is not an offence. Being in an offside position is legal. It becomes an offence only if the player then interferes with play, interferes with an opponent, or gains an advantage from being there. A player standing offside on the far touchline while play develops elsewhere is not penalised.
The timing is the pass, not the touch. Position is judged at the instant the ball is played by the team-mate, not when it is received. This is why a player can appear yards beyond the defence when they collect the ball and still be onside — they were level when it was struck.
There are exemptions. No player can be offside directly from a throw-in, a corner or a goal kick. Nor from a ball received in their own half. Nor when the ball is deliberately played to them by an opponent — a defender's misplaced pass does not activate offside.
The rule exists to prevent goal-hanging: without it, forwards could simply wait beside the opposition goalkeeper.
Video assistance now judges these margins to a few centimetres, which is why offside decisions have become so contested.