During the latter part of the 9th century, the Tang Dynasty was confronting numerous challenges regarding public administration and natural disasters. After a disastrous flood in 858 which caused many casualties and a failed harvest in 873, the Chinese people began to believe that it was a "Mandate of Heaven" that the Tang Dynasty should come to an end.