We have performed the most realistic simulation to date of the operation of a scanning tunneling microscope. Probe-sample distances from beyond tunneling to actual surface contact are covered. We simultaneously calculate forces, atomic displacements, and tunneling currents, allowing quantitative comparison with experimental values. A distance regime below which the probe becomes unstable is identified. It is shown that the real distance differs substantially from previous estimates because of large atomic displacements on the surface and at the probe-tip.