After entering Shaolin, it is said that Bodhidharma found the monks out of shape from a lifetime spent only in study and scholasticism, so he introduced a regimen of martial exercises which later developed into kung fu. Traditionally, the Shaolin monks developed their martial arts expertise as a defense against aggressors’ attacks, as a means to promote health, and as a mental and physical discipline.
The temple’s military fame began during the early Tang Dynasty (618-907). Records describe Shaolin fighting monks saving the life of the future emperor Li Shimin (in this record, it says that the monks were in and out of the fort before anyone could even raise the alarm) and assisting in his fight against renegade forces.
Once enthroned, the gratified emperor enlarged their compound and gave permission for some monks to continue their military training. Shaolin kung fu reached its peak during the Ming Dynasty (1368-1644), when several hundred Shaolin monks were given military status and personally led campaigns against rebels and Japanese bandits. By this time, the Shaolin had developed their own unique style of martial arts, known as Shaolinquan.
The original temple survived being sacked and rebuilt many times, but the Manchus destroyed the compound in 1647 and massacred almost the entire population of monks. Shaolin was not rebuilt until around 1800. The most recent destruction was a fire set by the warlord Shi Yousan in 1928, which destroyed the buildings and many priceless manuscripts of the temple library.