4. Given real numbers $a$ and $b$ satisfy $ab = 2a + 2b - 3$. Then the minimum value of $a^{2} + b^{2}$ is ( ).
(A) 1
(B) 2
(C) 3
(D) 4
4. B.

Let $x=a+b, y=a b$. Then $y=2 x-3$. Therefore,
$$
\begin{array}{l}
a^{2}+b^{2}=(a+b)^{2}-2 a b \\
=x^{2}-2 y=x^{2}-2(2 x-3) \\
=x^{2}-4 x+6=(x-2)^{2}+2 \geqslant 2 .
\end{array}
$$

When $x=2$, i.e., $y=1, a=b=1$, the equality holds.