© 2015 Astronomical Society of Australia. The Murchison Widefield Array is a new low-frequency interferometric radio telescope built in Western Australia at one of the locations of the future Square Kilometre Array. We describe the automated radio-frequency interference detection strategy implemented for the Murchison Widefield Array, which is based on the aoflagger platform, and present 72-231 MHz radio-frequency interference statistics from 10 observing nights. Radio-frequency interference detection removes 1.1% of the data. Radio-frequency interference from digital TV is observed 3% of the time due to occasional ionospheric or atmospheric propagation. After radio-frequency interference detection and excision, almost all data can be calibrated and imaged without further radio-frequency interference mitigation efforts, including observations within the FM and digital TV bands. The results are compared to a previously published Low-Frequency Array radio-frequency interference survey. The remote location of the Murchison Widefield Array results in a substantially cleaner radio-frequency interference environment compared to Low-Frequency Array's radio environment, but adequate detection of radio-frequency interference is still required before data can be analysed. We include specific recommendations designed to make the Square Kilometre Array more robust to radio-frequency interference, including: the availability of sufficient computing power for radio-frequency interference detection; accounting for radio-frequency interference in the receiver design; a smooth band-pass response; and the capability of radio-frequency interference detection at high time and frequency resolution (second and kHz-scale respectively).