2. Given the equation in $x$
$x^{2}-2 a x+a^{2}-4 a=0$ (where $a$ is a real number)
has at least one complex root with a modulus of 3. Then the possible values of $a$ are ( ).
(A) 1,9
(B) $-1,9,2-\sqrt{13}$
(C) $\pm 1,9,2+\sqrt{13}$
(D) $1,9,2-\sqrt{13}$
2. (D).

When a complex root is a real number, it is 3, then we have $3^{2}-2 a \times$ $3+a^{2}-4 a=0$, which is $a^{2}-10 a+9=0$, yielding $a=1,9$ (at this point $\left.\Delta=4 a^{2}-4\left(a^{2}-4 a\right)>0\right)$.

When the complex root is an imaginary number, we have $\Delta=4 a^{2}-4\left(a^{2}-4 a\right)$ $<0$, yielding $a<0$. Let these two conjugate imaginary roots be $z, \bar{z}$, then $z \bar{z}$ $=a^{2}-4 a$. Also, $|z|=|\bar{z}|=3$, so $a^{2}-4 a-9=0$, and since $a<0$, we get $a=2-\sqrt{13}$.
Therefore, the values of $a$ that satisfy the requirements are $a=1,9,2-\sqrt{13}$.