Pakistan declared a state of emergency and appealed for international help after prolonged monsoon rains killed nearly 1,000 people and left over 20 million homeless.