Electromagnetic warfare or electronic warfare is warfare involving the use of the electromagnetic spectrum or directed energy to control the spectrum, attack an enemy, or impede enemy operations.