A Wodonga man who harassed an ex-partner from outside her new Wangaratta home for six hours has been released to a Wangaratta rehabilitation centre.

The 34-year-old appeared at Wodonga Magistrates’ Court from the custody dock last Thursday to plead guilty to stalking an ex-partner.

The court heard on 15 October this year the man’s ex-partner “reluctantly” agreed to give him a lift from Wodonga to Wangaratta, where she was moving to live.

After telling him he wasn't welcome at her new home, the defendant was dropped off in the Wangaratta CBD, and later crossed paths the woman shopping at Coles and followed her home.

From 1am to 7am he knocked on the doors and windows of the victim’s house while contacting the woman more than 300 times via phone or text.

When his mobile phone went flat, he went to use nearby pay phones to continue to call the victim.

He drew a love heart with chalk at the front of the property.

The incident was reported to police who arrived at the victim’s house at 7:15am, as officers noticed the woman’s phone constantly going off as they spoke to her.

The accused was found at the Wangaratta Railway Station at 11:30am and was arrested.

He admitted to stalking the woman throughout the night and he didn’t think it classified as family violence.

He was taken into custody where he has stayed since.

Prior to the offending, the man had spent 86 days in custody for prior breaches to the same intervention order and he was bailed to the Wangaratta Therapeutic Community rehabilitation centre.

After a three week stay, the man self-discharged and went back to Wodonga just days prior to his most recent offending.

Defence counsel Dane Keenes said his client had been re-offered a place at the rehabilitation centre.

Mr Keenes said his client felt the centre wasn’t positive for his first stay, only to belatedly realise how beneficial it was battling his drug addiction and homelessness.

Police prosecutor Senior Constable Victoria Lennon said the message from the victim was for the accused to seek help and to stay a full six months at the rehab centre.

Magistrate Ian Watkins bailed the defendant to the Wangaratta rehab centre and adjourned his sentence for 17 December.

“Your relationship is over, no more,” he said.

“You know that beforehand, but you kept going back.

“If you become institutionalised as a result, that’s your fault.”