2. The equation about $x$
$$
x^{2}-2 a x+a^{2}-4 a=0
$$

has an imaginary root with a modulus of 3. Then the value of the real number $a$ is $\qquad$
$2.2-\sqrt{13}$.
$$
\begin{array}{l}
\text { From }(x-a)^{2}=4 a<0 \Rightarrow x=a-2 \sqrt{-a} \mathrm{i} . \\
\text { Also }|x|^{2}=a^{2}-4 a=9 \Rightarrow a-2= \pm \sqrt{13} \text {. }
\end{array}
$$

Since $a<0$, then, $a=2-\sqrt{13}$.