(TMZ) -- Jennifer Hudson had the cops come to her Chicago-area home Thursday night and throw baby daddy David Otunga out ... TMZ has learned.

Sources familiar with the case tell TMZ, Hudson went to court Thursday without telling Otunga and got an order of protection, claiming he is a risk to both her and their 8-year-old son, David, Jr.

The police came, allowed Otunga to pack a bag and ordered him out.

Sources tell TMZ the catalyst for the order of protection is turf and custody war. TMZ sources say the couple has been broken up for several months ... after David allegedly found out Hudson was dating someone else.

David stayed in the family home -- which is owned by Jennifer -- partly because he's been the primary caregiver since she's on the road a lot. TMZ was told the couple has been negotiating a custody arrangement for the last few weeks, but the negotiations broke down after both David and Jennifer dug in ... each wanting primary physical custody of their son.

TMZ sources say Jennifer demanded that David leave the home, and when it became apparent he wasn't going to comply she went to court for the order of protection. She's also filed a petition for full physical custody.

Photo: Getty Images