Prolonged and severe hypothyroidism and hyperthyroidism can result in hair loss.