Basketball is a team sport played indoors where two teams of five players each try to score points by throwing the ball through a hoop. James Naismith invented basketball in 1891 in Canada. It has grown tremendously in popularity worldwide and is now one of the most widely viewed sports. Games are played in four 10-minute quarters with substitutions allowed. Points are scored by shooting the ball through the hoop, with two or three points awarded depending on where the shot is taken from. Referees enforce the rules and officiate the game.