  The fraction of massive stars in young stellar clusters is of importance as
they are the dominant sources of both mechanical and radiative feedback,
strongly influencing the thermal and dynamical state of their birth
environments. It turns out that a significant fraction of massive stars escape
from their parent cluster via dynamical interactions of single stars and/or
multiple stellar systems. M 17 is the nearest giant H II region hosting a very
young and massive cluster: NGC 6618. Our aim is to identify stars brighter than
G < 21 mag that belong to NGC 6618, including the (massive) stars that may have
escaped since its formation, and to determine the cluster distance and age. We
identified 42 members of NGC 6618 of which eight have a spectral type of O,
with a mean distance of 1675 pc and a transversal velocity dispersion of about
3 km/s , and a radial velocity dispersion of 6 km/s. Another ten O stars are
associated with NGC 6618, but they cannot be classified as members due to poor
astrometry or high extinction. We have also identified six O star runaways. The
relative transverse velocity of these runaways ranges from 10 to 70 km/s and
their kinematic age ranges from about 100 to 750 kyr. Given the already
established young age of NGC 6618 (< 1 Myr), this implies that massive stars
are being ejected from the cluster already directly after or during the cluster
formation process. When constructing the initial mass function, one has to take
into account the massive stars that have already escaped from the cluster, that
is, about 30% of the O stars of the original population of NGC 6618. The
trajectories of the O runaways can be traced back to the central 0.25 pc region
of NGC 6618. The good agreement between the evolutionary and kinematic age of
the runaways implies that the latter provides an independent way to estimate (a
lower limit to) the age of the cluster.
