When did skiing become a sport?

The first skiing competition was held in January 1862 by "Trysil Skytte- og Skiløberforening" in Norway.