Direct N-body calculations are presented of the formation of Galactic clusters using GASEX, which is a variant of the code Nbody6. The calculations focus on the possible evolution of the Orion nebula cluster (ONC) by assuming that the embedded OB stars explosively drove out 2/3 of its mass in the form of gas about 0.4 Myr ago. A bound cluster forms readily and survives for 150 Myr despite additional mass loss from the large number of massive stars, and the Galactic tidal field. This is the very first time that cluster formation is obtained under such realistic conditions. The cluster contains about 1/3 of the initial 10(4) stars, and resembles the Pleiades cluster to a remarkable degree, implying that an ONC-like cluster may have been a pre...