Donavan Lewis Cox, 27, is charged with aggravated battery on a pregnant woman, battery by strangulation, child cruelty and two counts of aggravated battery with a deadly weapon, court records show.

PANAMA CITY — An expecting father has been arrested after he allegedly slashed the mother of his unborn child with a straight razor and threatened to cut a 10-month-old child, according to arrest reports.

Donavan Lewis Cox, 27, appeared in court Wednesday on charges of aggravated battery on a pregnant woman, battery by strangulation, child cruelty and two counts of aggravated battery with a deadly weapon, court records show. He was arrested after having an epileptic seizure, which allowed the victim to flee with the children during a domestic violence incident and contact law enforcement.

Cox has been court-ordered to not have contact with any of the victims as the case proceeds. He has an extensive history of domestic violence against several women predating the most recent alleged attack, court records indicate.

According to Bay County Sheriff’s Office reports, domestic issues arose several times from Aug. 14 through Monday with the victim telling officers that Cox at times struck her in the face with a cooking pot and struck her with his hands. He also allegedly put a glass “weed bowl” in an article of baby’s clothing to strike her in the legs with it and pinned her down and choked her to the point she could not breathe — all while knowing she was six weeks pregnant, BCSO reported.

The incidents culminated about 10 a.m. Monday, the victim told officers, when Cox allegedly took a straight razor and slashed her twice on the leg. He then went over to a 10-month-old with the straight razor and allegedly pretended to cut the child, BCSO reported.

At one point, Cox draped a blanket over himself and instructed the victim to “hit him with a pipe because he would rather feel physical pain than emotional pain,” officers reported.

The victim “said she did it because she was scared that he would cut her with the straight razor if she did not comply with his directives ... she was also scared for the baby’s safety and herself,” officers wrote. “During this event, Donavan went into a seizure. At that moment, she fled the home with the baby seeking safety with family.”

The victim called BCSO the next day, and Cox was taken into custody and transported to the Bay County Jail. In multiple cases dating to 2008, Cox has been convicted of different burglary incidents. He also was convicted of narcotics charges in 2014. And since then, two other women filed domestic violence restraining orders against Cox, leading up to the most recent attack.