4. In $\triangle A B C$, the side lengths $a, b, c$ satisfy $(a+b+c)(a+b-c)=a b$, then the angle opposite to side $A B$ is ( ).
(A) $30^{\circ}$
(B) $60^{\circ}$
(C) $120^{\circ}$
(D) $150^{\circ}$
4. $(a+b+c)(a+b-c)=ab \Rightarrow a^2+b^2-c^2=-ab$ $\Rightarrow \frac{a^2+b^2-c^2}{2ab}=-\frac{1}{2}$, by the cosine rule, $\cos \angle C=-\frac{1}{2}$, $\therefore \angle C=120^{\circ}$. Choose $(C)$.