The stampede occurred as exceptionally large crowds gathered for a traditional festival held at the vast building on top of a mountain.