Feedback from massive stars is believed to be a key element in the evolution of molecular clouds. We use high-resolution 3D smoothed particle hydrodynamics simulations to explore the dynamical effects of a single O7 star-emitting ionizing photons at 1049 s−1 and located at the centre of a molecular cloud with mass 104 M⊙ and radius 6.4 pc; we also perform comparison simulations in which the ionizing star is removed. The initial internal structure of the cloud is characterized by its fractal dimension, which we vary between and 2.8, and the standard deviation of the approximately log-normal initial density PDF, which is σ10 = 0.38 for all clouds. (i) As regards star formation, in the short term ionizing feedback is positive, in the sense that star formation occurs much more quickly (than in the comparison simulations), in gas that is compressed by the high pressure of the ionized gas. However, in the long term ionizing feedback is negative, in the sense that most of the cloud is dispersed with an outflow rate of up to ∼10−2 M⊙yr−1, on a time-scale comparable with the sound-crossing time for the ionized gas (), and triggered star formation is therefore limited to a few per cent of the cloud's mass. We will describe in greater detail the statistics of the triggered star formation in a companion paper. (ii) As regards the morphology of the ionization fronts (IFs) bounding the H ii region and the systematics of outflowing gas, we distinguish two regimes. For low , the initial cloud is dominated by large-scale structures, so the neutral gas tends to be swept up into a few extended coherent shells, and the ionized gas blows out through a few large holes between these shells; we term these H ii regions shell dominated. Conversely, for high , the initial cloud is dominated by small-scale structures, and these are quickly overrun by the advancing IF, thereby producing neutral pillars protruding into the H ii region, whilst the ionized gas blows out through a large number of small holes between the pillars; we term these H ii regions pillar dominated. (iii) As regards the injection of bulk kinetic energy, by ∼1 Myr, the expansion of the H ii region has delivered a mass-weighted rms velocity of ∼6 km s−1; this represents less than 0.1 per cent of the total energy radiated by the O7 star.