We study the gravitational contraction and fragmentation of filamentary primordial gas clouds by means of one-dimensional (1D) and two-dimensional (2D) hydrodynamical simulations. The cloud evolution is computed from the central proton density n(c) similar to 10(2) - 10(6) cm(-3) up to similar to 10(11-12) cm(-3). From the 1D simulations, it is found that the radial contraction decelerates after the central density reaches similar to 10(4) cm(-3), beyond which the LTE populations are achieved for the rotational levels of hydrogen molecules. When the central density reaches 10(11-12) cm(-3), the cloud becomes optically thick to the Ha lines. Therefore, the radial contraction almost stops at that stage. From the 2D simulations, it is found that the fragmentation takes place during the stages at which 10(4) cm(-3) less than or similar to 10(11-12) cm(-3) because the radial contraction becomes slower. The fragment mass depends on the initial model parameters such as the central density and temperature. For the higher initial temperature and higher initial density, the fragment mass is lower. Then, the maximum and minimum masses are estimated as 10(3) M. and 1 similar to 2 M., respectively. If one fragment collapses into one star, then the masses of the first stars are expected to range from 1 - 2 M. to similar to 10(3) M., which are low-mass deficient compared to the Pop I stars. The effect of HD cooling is also discussed.