Understanding the origin of high-mass stars is central to modern astrophysics. We shed light on this problem using novel radiation-hydrodynamic simulations that consistently follow the gravitational collapse of a massive molecular cloud, the subsequent build-up and fragmentation of the accretion disk surrounding the nascent star, and, for the first time, the interaction between its intense UV radiation field and the infalling material. We show that ionization feedback can neither stop protostellar mass growth nor suppress fragmentation. We present a consistent picture of the formation and evolution of H II regions that explains the observed morphology, time variability, and ages of ultracompact H II regions, solving the long-standing lifetime problem.