The three seconds rule (also referred to as the three-second rule or three in the key, often termed as lane violation) requires that in basketball, a player shall not remain in their team's foul lane for more than three consecutive seconds while that player's team is in control of a live ball in the frontcourt and the game clock is running. The countdown starts when one foot enters the paint and resets when both feet leave the area.
The three-second rule was introduced in 1990 and was expressed as such: no offensive player, with or without the ball, could remain in the key, for three seconds or more. Other sources indicate that the three-second rule was introduced in 1936 in an attempt to restrict the dominance of Leroy Edwards of the Oshkosh All-Stars, a team in Wisconsin that played in the National Basketball League (NBL) - forerunner to the National Basketball Association (NBA).
The three-second rule came about in part following a game at Madison Square Garden between the University of Kentucky (UK) and New York University (NYU) in 1945, won by NYU 23–22. The University of Kentucky team did not take their own referee, a common practice at the time, despite advice to the UK coach Adolph Rupp from Notre Dame coach George Keogan, who had lost to NYU the week prior and who warned Rupp of the discrepancies in officiating between the Midwest and the East. The game was rough. UK was unable to run its normal offense (which consisted of using screens) without being called for a foul. NYU's Irving Terjesen and Irwin Klein combined to guard one of UK's major players, Leroy Edwards, allowing him to score a mere 6 points (the lowest output of his career). The New York Post reacted with alarm: "The score says that NYU is the best college basketball team in the country and that the East still is supreme. But if Frank Lane, the referee from the Midwest, had worked the game, it's safe to assume big Leroy Edwards would have been given a fantastic number of foul shots. Minor mayhem was committed on the person of Edwards by Terjesen and Klein. Something will have to be done or the game will become entirely too rough."
Within the FIBA rules, an allowance is made for players who either receive the ball prior to being within the key for 3 seconds, or for those players who are leaving (or attempting to leave) the keyway.