A goal is scored when the ball crosses the goal line between the goal-posts and beneath the crossbar, even if a defending player last touched the ball before it crossed the goal line (see own goal). A goal may, however, be ruled illegal (and void by the referee) if the player who scored or a member of their team commits an offence under any of the laws between the time the ball was previously out of play and the goal being scored. It is also deemed void if a player on the opposing team commits an offence before the ball has passed the line, as in the case of fouls being committed, a penalty awarded but the ball continued on a path that caused it to cross the goal line.