"Modern Family" star Sarah Hyland just got a temporary restraining order against her ex-BF -- claiming the guy choked her, pushed her and threatened her life ... and her TV mom witnessed some of the abuse.
TMZ has obtained court docs filed by Hyland -- who plays Haley Dunphy -- in which she claims her ex Matthew Prokop terrorized her both verbally and physically during the last 4 years of their relationship.
According to the docs, Prokop -- an actor who once appeared on "Modern Family" -- pinned Hyland against a car during an argument about her outfit back in May and unleashed hell ... calling her "c**t, c**t, c**t" and choking her.
Hyland says in the docs, "His grip was so tight that I could not breathe or speak. I was scared and in fear for my life."
Sarah says she suffered injuries to her voice -- and had a "very sore throat following this event."
In the docs, Hyland says she knew she was in an abusive relationship -- and asked her TV mom Julie Bowen to come to her house to help "peacefully end the relationship."
Hyland says she had purchased a plane ticket to send Matthew back to his home in Texas -- but when Matthew arrived to the home and saw Julie (along with others), he freaked out ... "ran outside into the backyard and began screaming."
Hyland says Prokop threw a lighter at her -- and that's when Julie stepped in and told Sarah to get out of the house because she wasn't safe around Prokop.
In the docs, Hyland says Prokop also threatened to set one of her homes on fire -- and threatened that she would never see her dog again.
After Hyland broke up with Prokop, she claims he "relentlessly bombarded me with vile, threatening and emotionally disturbing texts and voice mails including his own suicide threats."
Hyland says Prokop entered a rehab facility in August -- but he got out on Sept. 21st ... and claims the director of the facility contacted her and told her it would be in her best interest to get a restraining order against him due to his mental state and attitude against her.
Hyland took his advice -- and an L.A. judge granted a temporary restraining order ... requiring Prokop to stay at least 100 yards away from Sarah and her dog at all times.
We reached out to Prokop and his people for comment -- so far no word back.