4. Given rational numbers $a, b, c$ satisfy
$$
a^{2}+b^{2}+1=2\left(c^{2}+a b+b-a\right) .
$$

Then the value of $a-b-c$ is ( ).
(A) 0
(B) -1
(C) $\pm 1$
(D) uncertain
4. B.

The original equation can be transformed into $(a-b+1)^{2}=2 c^{2}$.
Since $a$, $b$, and $c$ are rational numbers, it follows that,
$$
c=0, a-b+1=0 \text {. }
$$

Therefore, $a-b-c=-1$.