  We present the first three-dimensional radiation-magnetohydrodynamic
simulations of the photoionisation of a dense, magnetised molecular globule by
an external source of ultraviolet radiation. We find that, for the case of a
strong ionising field, significant deviations from the non-magnetic evolution
are seen when the initial magnetic field threading the globule has an
associated magnetic pressure that is greater than one hundred times the gas
pressure. In such a strong-field case, the photoevaporating globule will adopt
a flattened or "curled up" shape, depending on the initial field orientation,
and magnetic confinement of the ionised photoevaporation flow can lead to
recombination and subsequent fragmentation during advanced stages of the
globule evolution. We find suggestive evidence that such magnetic effects may
be important in the formation of bright, bar-like emission features in H II
regions. We include simple but realistic fits to heating and cooling rates in
the neutral and molecular gas in the vicinity of a high-mass star cluster and
show that the frequently used isothermal approximation can lead to an
overestimate of the importance of gravitational instability in the radiatively
imploded globule. For globules within 2 parsecs of a high-mass star cluster, we
find that heating by stellar x rays prevents the molecular gas from cooling
below 50 K.
