  The level-spacing distribution of a spin 1/2 XXZ chain is numerically studied
under random magnetic field. We show explicitly how the level statistics
depends on the lattice size L, the anisotropy parameter $\Delta$, and the mean
amplitude of the random magnetic field h. In the energy spectrum, quantum
integrability competes with nonintegrability derived from the randomness, where
the XXZ interaction is modified by the parameter $\Delta$. When $\Delta \ne 0$,
the level-spacing distribution mostly shows Wigner-like behavior, while when
$\Delta$=0, Poisson-like behavior appears although the system is nonintegrable
due to randomness. Poisson-like behavior also appears for $\Delta \ne 0$ in the
large h limit. Furthermore, the level-spacing distribution depends on the
lattice size L, particularly when the random field is weak.
