An entry in the Tarikh-i-Hassan records that in 883 AD during the reign of King Avantivarman (855-883) an earthquake in Kashmir triggered a landslide that impounded the River Jhelum and flooded the Kashmir Valley. Kalhana's Rajatarangini provides abundant details about how the ninth century engineer Suyya both cleared the natural dam, drained the valley and instituted numerous irrigation works. We identify the landslide(s) responsible for this Medieval flood and from twentieth century discharge statistics of the Jhelum calculate that it would have taken at least 2 years to flood the Kashmir Valley to near Anantnag. This presents a chronological difficulty, for the causal earthquake could not have occurred in the last 4 months of Avantivarman's rule, and we conclude that it must have occurred much earlier, perhaps before the start of his reign. The flood occurred during a period of widespread temple building using massive uncemented limestone megablocks, capped by monolithic multi-ton roofs. Many of these magnificent temples, now in ruinous condition, are located close to the shores of the inferred Medieval flood level, suggesting that the transport of construction materials for these temples may have been ferried by barge from distant quarries. Historians and archaeologists have attributed the partial collapse of these temples to malicious damage by subsequent occupants of the valley, but the misalignment of blocks at lower levels within each edifice in recent earthquakes suggests that their lateral offsets are the result of jostling during prolonged shaking in historical earthquakes. From the serendipitous entrapment of datable materials beneath fallen blocks from Kashmir's ninth century temples we can, in principle, identify the times of historical earthquakes. We chose the ruined Sugandhesa temple near Patan to test this hypothesis. Preliminary results indicate collapse in the tenth or eleventh century, and significant damage in 1885, with at least one intervening earthquake possibly in the seventieth century.