4. Given that $a$ and 6 satisfy
$$
5 a^{2}+2 b^{2}-1=6 a b+4 a-2 b \text{. }
$$

Then the value of $(a-b)^{1004}$ is ( ).
(A) 0
(B) 1
(C) 2
(D) Cannot be determined
4. A

Given the equation is transformed into $5 a^{2}-(6 b+4) a+\left(2 b^{2}+2 b+1\right)$ $=0$, this is a quadratic equation in terms of $a$. Since it has real roots, then $\Delta=(6 b+$ $4)^{2}-20\left(2 b^{2}+2 b+1\right) \geqslant 0$. Solving this, we get $(b-1)^{2} \leqslant 0$. Therefore, $b$ $=1$. Subsequently, solving for $a$ yields $a=1$. Hence, $(a-b)^{1994}=0$.