Emergency custody with parental agreement & DSS

I need to know if i can file for emergency custody if there is a parental agreement already in place and i have not returned the child to her mom because she was beaten. DSS has been brough in and they are investigating. the told me they handed the matter over to the police. I was told i can modify the agreement until the dss matter is resolved, however the mother came to my house looking to get my daughter since im in violation of the agreement. Can i seek emergency order to prevent her from taking the child back and until my next hearing.

Yes, if you have fear of the child being physically abused, you should file for an emergency child custody order. For the court to enter an emergency child custody order, they must find that the child is exposed to a substantial risk of bodily injury or sexual abuse or that there is a substantial risk that the child may be abducted or removed from the State of North Carolina for the purpose of evading the jurisdiction of North Carolina courts.