  We present an unquenched $N_f=2$ lattice computation of the $B_{K}$ parameter
which controls $K^0-\bar K^0$ oscillations. A partially quenched setup is
employed with two maximally twisted dynamical (sea) light Wilson quarks, and
valence quarks of both the maximally twisted and the Osterwalder--Seiler
variety. Suitable combinations of these two kinds of valence quarks lead to a
lattice definition of the $B_{K}$ parameter which is both multiplicatively
renormalizable and O($a$) improved. Employing the non-perturbative RI-MOM
scheme, in the continuum limit and at the physical value of the pion mass we
get $B^{\rm RGI}_K=0.729\pm 0.030$, a number well in line with the existing
quenched and unquenched determinations.
