From an analysis of the decay Bs0-->J/psi phi, we obtain the width difference between the light and heavy mass eigenstates DeltaGamma identical with (GammaL-GammaH)=0.17+/-0.09(stat)+/-0.02(syst) ps-1 and the CP-violating phase phis=-0.79+/-0.56(stat)(-0.01)(+0.14)(syst). Under the hypothesis of no CP violation (phis identical with 0), we obtain 1/Gamma=tau(Bs0)=1.52+/-0.08(stat)(-0.03)(+0.01)(syst) ps and DeltaGamma=0.12(-0.10)(+0.08)(stat)+/-0.02(syst) ps-1. The data sample corresponds to an integrated luminosity of about 1.1 fb-1 accumulated with the D0 detector at the Fermilab Tevatron collider. This is the first direct measurement of the CP-violating mixing phase in the Bs0 system.