The viscous motion of an interface driven by an ac external field of frequency $omega_0$ in a random medium is considered here for the first time. The velocity exhibits a smeared depinning transition showing a double hysteresis which is absent in the adiabatic case $omega_0
ightarrow 0$. Using scaling arguments and an approximate renormalization group calculation we explain the main characteristics of the hysteresis loop. In the low frequency limit these can be expressed in terms of the depinning threshold and the critical exponents of the adiabatic case.