The blackout has hit 18 of the country’s 23 states and is blamed on an “electromagnetic attack”.