The power cut left more than a million people without electricity and severely affected rail services.