A man accused of harassing CNN newsman Anderson Cooper has been released from custody after striking a plea deal with prosecutors.

Alex Hausner had been behind bars since his arrest last July (13), when he tried to kick down the door of the broadcaster's New York home and threatened Cooper and his boyfriend, Benjamin Maisani.

He recently agreed to confess to counts of aggravated harassment and menacing, and was due to officially enter his plea during a hearing on Tuesday (22Apr14), but that had to be postponed after he broke down in tears in Manhattan Supreme Court.

The 38 year old returned to court on Friday (25Apr14) and pleaded guilty to the charges. He was sentenced to time served, handed five years probation and ordered to stay away from Cooper and Maisani.

A status update has been set for 20 May (14).