Determinism is established in quantum mechanics by tracing the probabilities in the Born rules back to the absolute (overall) phase constants of the wave functions and recognizing these phase constants as pseudorandom numbers. The reduction process (collapse) is independent of measurement. It occurs when two wavepackets overlap in ordinary space and satisfy a certain criterion, which depends on the phase constants of both wavepackets. Reduction means contraction of the wavepackets to the place of overlap. The measurement apparatus fans out the incoming wavepacket into spatially separated eigenpackets of the chosen observable. When one of these eigenpackets together with a wavepacket located in the apparatus satisfy the criterion, the reduction associates the place of contraction with an eigenvalue of the observable. The theory is nonlocal and contextual.