NEWBURYPORT — A local man accused of uploading a nude video of his ex-girlfriend on Twitter earlier this year avoided jail time Wednesday in Newburyport District Court after admitting a judge could find him guilty of criminal harassment. 

Connor J. Brophy, 28, of Fox Run Drive, was ordered to stay away from and have no contact with his ex-girlfriend or her husband. He was also ordered not to post any images of or mention the woman on social media.

Standing before Judge Peter Doyle, Brophy swore under oath that he deleted every nude image.

If Brophy complies with Doyle’s orders and stays out of trouble with the law, the charge against him will be dropped after nine months. 

According to a report, it was early February when the victim’s husband discovered a nude photo and a nude video of her on his Twitter page. He immediately alerted Twitter and asked for the images to be removed. He then called his wife who quickly learned that Brophy was behind it.

This happened less than two hours after Brophy called her 27 times and sent multiple texts messages, according to the report. She didn’t reply to any of them other to say she was going to report him to police. Brophy’s barrage of phone calls came the morning after he convinced her to meet him outside a downtown restaurant. He told her he was leaving town and wanted to say goodbye, according to Newburyport police Officer Tori Smith’s report. 

Smith also reported the woman had taken out a restraining order against Brophy following their breakup but let it expire once Brophy stopped contacting her. 

Forty-six states and the District of Columbia have passed laws criminalizing so-called “revenge porn” in recent years but missing from that list is Massachusetts. In February, Gov. Charles Baker re-filed a bill aimed at cracking down on those who post pornographic images of others without permission. Action on that bill is pending. 

Dave Rogers can be reached by email at drogers@gloucestertimes.com. Follow him on Twitter @drogers41008.