 In American professional basketball , the defending team is also prohibited from staying in the key for more than three seconds , unless a player is directly guarding an offensive player . If a player surpasses that time , his / her team will be charged with a defensive three @-@ second violation , which will result in a technical foul where the team with the ball shoots one free throw plus ball possession and a reset of the shot clock . In FIBA @-@ sanctioned tournaments , on the other hand , the defending team is allowed to stay on the key for an unlimited amount of time . In all cases , the count <unk> if the shot hits the rim or if the player steps out of the lane . 
