We consider the dynamics of a compressible fluid under the influence of electrostrictive ponderomotive forces in strong inhomogeneous nonstationary electric fields. It is shown that if the fronts of the voltage rise at a sharp, needle-like electrode are rather steep (less than or about nanoseconds), and the region of negative pressure arises, which can reach values at which the fluid loses its continuity with the formation of cavitation ruptures. If the voltage on the electrode is not large enough or the front is flatter, the cavitation in the liquid does not occur. However, a sudden shutdown of the field results in a reverse flow of liquid from the electrode, which leads to appearance of negative pressure, and, possibly, cavitation.