An “incredibly immature” 22-year-old man is beginning a 16-month jail term after admitting carrying out a lengthy campaign of harassment against his own friend.

Codi Trower masqueraded as the woman’s former partner to send social media messages, make anonymous phone calls, and send unpleasant cards mocking the woman’s miscarriage and calling her “a bitch”.

He also set up multiple fake social media accounts under usernames such as “I’m gonna kill you” and threatened to go to her home.

All of it left the victim, who lives in the Bradford area, feeling “terrified” and caused police to arrest her innocent former partner on five separate occasions.

Trower was described as suffering from attachment issues relating to his parents’ separation when he was five years old, and that he “longed for female attention”.

In a statement to the court his victim said Trower’s behaviour had had a huge impact on her life leaving her terrified to go out and provoking constant panic attacks.

She said: “I feel like I have been betrayed by someone I trusted and cannot understand why he would do this to me.

“He not only traumatised me through his abuse and threats but also tricked me into thinking my ex-partner was stalking me.

“What Codi has done is make our four-year friendship feel like nothing but a lie.”

Trower, from Harrogate, listened via video link from HMP Nottingham as Mr Recorder Patrick Palmer jailed him following a sentencing hearing at Bradford Crown Court.

He said: “This was a prolonged, sustained, and determined attempt to pervert the course of justice that has been maintained by you.

“I consider that in your case only appropriate punishment can only be achieved by an immediate custodial sentence.”

Prosecutor Anthony Moore told the court how Trower’s offending spanned the periods June to October 2023 and then April to August 2024 when he was revealed to be behind the stalking and harassment.

He was identified after police analysis of the former boyfriend’s phone and financial records put him in the clear and an IP address was traced to Trower, who was consequently arrested at work.

The court heard that in June 2023 the victim began receiving anonymous calls and social media messages in her former partner’s name asking to reconcile.

Over time she received numerous “no caller id” phone calls, which she believed were from her former partner but were actually sent by Trower in his guise.

She blocked the number but then received several personalised cards. One said that she “could not run from him” and that “she did not deserve to be with anyone but him”.

In October she received a “nasty” card signed in her former partner’s name that referenced a recent miscarriage and said: “It didn’t survive. Thank f*** for that.”

She believed the former partner was responsible for setting up several fake social media accounts and that her address had been shared with a group on Snapchat.

She also believed her ex-partner was trying to be her online and was attempting to chat with children. Via social media and on cards she was called “a bitch”.

The messages suggested the sender would turn up at her house and to “go after” her friend Codi – actually the person responsible for the abuse.

At this point the victim said she was “terrified” as it appeared that the harassment was escalating and that her family might be hurt.

Mr Moore said: “All of this was in the guise of [the former partner] and that was who [the victim] thought was behind all of this behaviour.”

The contact stopped until April 2024 when a Snapchat message arrived. There then followed a flurry of calls into the early hours that left the victim “shaken and anxious”. The police were informed.

More social media accounts were created with usernames such as “You f***ing bitch”, “I might pay a visit” and “I’m gonna kill you”.

The victim obtained a non-molestation order against her ex-partner, but calls continued with 25 received over an 11-day period in June.

The court heard that during the 12-month period of Trower’s offending the victim had a platonic relationship with him, yet on August 3 this year he sent a message saying “I will f*** you up”.

It left the victim frightened to be in her house or on her own.

Trower was found to be the culprit when calls were traced to an IP address at his home in East Park Road, Spofforth, Harrogate.

He was arrested and initially denied what he had done before admitting being responsible.

He later pleaded guilty to two charges of stalking involving serious alarm/distress, and two charges of committing an act with intention to pervert the course of justice.

The court heard he was of previous good character.

Mitigating, Celine Kart said Trower was “incredibly remorseful” and that his behaviour, which may be related to neurodiversity issues and autism, was “significantly out of character”.

Describing him as an “incredibly immature and vulnerable young man” she said he witnessed the “difficult” separation of his parents at the age of five and that he had “attachment issues particularly caused by that separation of his parents”.

She said: “Put bluntly, he has longed for female attention because of his relationship – or lack of it – with his mother.

“That is of direct relevance and perhaps a contributing factor to this case.”

Sentencing Trower to a total of 16 months imprisonment, Recorder Palmer also made him subject to a five-year restraining order banning any contact with the victim.