We employ the first fully three-dimensional simulation to study the role of magnetic fields and ion-neutral friction in regulating gravitationally-driven fragmentation of molecular clouds. The cores in an initially subcritical cloud develop gradually over an ambipolar diffusion time while the cores in an initially supercritical cloud develop in a dynamical time. The infall speeds on to cores are subsonic in the case of an initially subcritical cloud, while an extended (ga 0.1 pc) region of supersonic infall exists in the case of an initially supercritical cloud. These results are consistent with previous two-dimensional simulations. We also found that a snapshot of the relation between density (rho) and the strength of the magnetic field (B) at different spatial points of the cloud coincides with the evolutionary track of an individual core. When the density becomes large, both relations tend to B propto rho^{0.5}.