We report observations, using the IRAM 30 m telescope, of 30 ultracompact and hypercompact HII regions in the lines of HCO + (3−2) and/or HCO + (1−0) and H30α and/or H39α. Images are presented in both HCO + (3−2) and H30α toward a subset of regions (16 in HCO + (3−2), 14 in H30α) with a resolution of 12 �� . In addition, H 13 CO + (3−2) observations are reported toward 13 HII regions where HCO + (3−2) displays complex profiles. It is shown that the absorption dips in the HCO + profiles are due to HCO + self-absorption, not absorption of the HII free-free emission or warm dust emission surrounding the HII region or two velocity components along the line of sight. It was found that among the sources with self-absorbed profiles, 8 are contracting and 5 are expanding. Mass fluxes are found to be typically a few times 10 −3 Myr −1 , implying time scales for massive star formation <10 5 yrs. HCO + and H2 column densities are estimated for a subset of the sources from which masses of the dense central cloud cores were estimated. Implications of the derived column densities, masses, flow velocities, and mass fluxes are discussed. Ultra-compact (UC) HII regions are sites of recent massive star formation. UC HII regions are of special interest because they occupy an important stage in the evolution of young massive stars that is still only understood in broad outline. Identifying the ionizing star(s) and their associated natal cluster of lower mass stars in UC HII regions has proven quite difficult; identifi- cations have been reported for only a few UC HII regions. The immediate regions around the central star(s) of UC HII regions are expected to be very dynamic due to possible infall, outflows, stellar winds, accretion disk rotation, turbulence, and shocks. The dynamics and physical properties of the photo-dissociation regions (PDRs) that surround UC HII regions and the ambient natal molecular gas that surrounds the PDRs must also be in- cluded to place UC HII regions in context with their environ- ments. Spectroscopy of the H + ,P DR(H 0 ), and molecular en- velopes (H2) is essential to understand the interactions of UC HII regions with their environments. Churchwell (2002) has ar- gued, based on the lack of evidence for outflows in high reso- lution radio continuum images, that by the time young massive stars have formed UC HII regions they have largely ceased the accretion process. This is indirect evidence that has so far not been confirmed by spectroscopic observations. To understand the early evolution of massive stars and how they impact their environments, we must determine at what evolutionary stage young massive stars quench accretion and by what mechanism. Is it because the stars use all the matter in their neighborhood or