The koan was an invention of the Sung Dynasty (960-1279), an era of consolidation in the Chinese empire after the demise of the Tang and passage of a war-torn interlude known as the Five Dynasties (907-60). Although Sung Chan seemed to be booming, Buddhism in general continued the decline that began with the Great Persecution of 845.
Although there were fewer monks, those who did come probably
had higher education than previously, for the Sung educational
system was the world's best at the time. Whether this was good
for Chan is not a simple question. The hardy rural monks who had
passed beyond the Buddhist scriptures made Chan what it was. Could
the powers of the antirational be preserved in an atmosphere where
the greatest respect was reserved for those who spent years memorizing
the Chinese classics? The answer to this was to rest with the koan.