We present numerical simulations of a turbulent magnetic dynamo mimicking closely the Riga-dynamo experiment at Re approximately 3.5x10(6) and 15< or =Rem< or =20. The Reynolds-averaged Navier-Stokes equations for the fluid flow and turbulence field are solved simultaneously with the direct numerical solution of the magnetic field equations. The fully integrated two-way-coupled simulations reproduced all features of the magnetic self-excitation detected by the Riga experiment, with frequencies and amplitudes of the self-generated magnetic field in good agreement with the experimental records, and provided full insight into the unsteady magnetic and velocity fields and the mechanisms of the dynamo action.