A violation in basketball, defined as an offensive or defensive player being positioned in the key longer than three seconds. The requirements for calling this violation on an offensive or defensive player differ. A defensive player may remain in the key as long as he is actively defending an offensive player. If a defender stays in the key after the offensive player has stepped out, he will be given a new three seconds to step out before being called for a violation. An offensive player is called for a violation of the rule when he remains in the key for three seconds with both feet. If one foot is outside the key, no violation can occur.
The three-second rule, which the three-second violation refers to, was developed in order to prevent offensive or defensive players from "camping out" under the basket. The area under the basket, known as "the paint", is the most valuable position on the floor. If a player were allowed to stand in there, teams would simply recruit the tallest or heaviest players to do just that. The rule was first introduced in 1936 after a college basketball game between University of Kentucky and New York University.