When was basketball officially a sport?

Basketball was officially recognized as a sport in 1891 when James Naismith created the game at a YMCA in Springfield, Massachusetts.