A contractor who is being sued by Sylvester Stallone over a construction project gone bad is now lashing out himself ... claiming in new legal docs the actor abused his dog and threatened to blow the contractor's head off.
Mohamed Hadid just got a temporary restraining order against Sly, claiming the "Rocky" star walked up to him in court, pushed him and threatened, "I am going to kill you motherf****r."
Sly is about to go to trial in his legal war against Hadid, claiming the contractor royally screwed up his house to the tune of $1.4 million, calling him an "unscrupulous, unlicensed predator."
Hadid claims in his new legal docs ... while he was working on Sly's house, he witnessed the actor fly into fits of rage ... at times grabbing his dog by the neck and throwing it into its crib. Hadid also claims Sly threatened to smash his head in with a baseball bat.
And there's this allegation .... Hadid says Sly once said, "Get these dirty Mexicans out of here or I will blow your head off."
Sly's lawyer, Marty Singer, says the actor was never notified of a hearing for a restraining order, adding Sly's trial is about to begin and this is just a desperate attempt to smear him. Singer says he took Hadid's deposition last week and asked about all the conversations he had with Sly -- and no threats were ever mentioned.
Singer says, "This is a desperate attempt by a man who wants to be a media star, which is why he's a guest star on 'Shahs of Sunset.'"