The offside rule in soccer turns on one simple point: an attacker is offside if he is past the second-to-last defender when the ball is played. The goalkeeper is treated as the last defender, so the line changes with the shape of the defense.
FIFA has tied that rule to the World Cup, where the call can decide whether a goal stands or gets wiped out. The law was invented and codified 163 years ago, and it remains one of the most controversial rules in the sport because it stops attackers from waiting behind the defense for a long pass.
FIFA And The Second-To-Last Defender
That is the part players and viewers miss most often. A receiving attacker is not offside merely for standing in an offside position, and a player can still move offside after the ball is played if he was onside at the moment of delivery.
The test is applied when the ball is delivered, not when the run finishes. That keeps the focus on where the attacker started relative to the second-to-last defender, not on the final step before the shot.
World Cup Restarts
The rule also has clear exceptions. It does not apply on set pieces, corner kicks, or goal kicks, so those restarts are handled without an offside decision at all.
In play, a sideline official raises the flag straight up when an attacking player scores while offside, and the on-field referee should stop the action after seeing it. That procedure is what turns the law into an immediate decision instead of a delayed argument.
The game still uses 11 players on each side, but the offside line is built from the second-to-last defender rather than a fixed mark on the field. For anyone watching the World Cup, that is the detail that decides whether the move is legal before the shot ever leaves the foot.






