A prison inmate who admitted abusing his partner via text messages for months was sentenced on Tuesday in a way meant to stop further offending and protect his victim in the future.

Andy Errol Barnes, 38, pleaded guilty to using an Information and Communication Technology network to abuse the woman over a period of five months from Oct. 31, 2016.

Barnes at the time was in custody at Northward Prison awaiting trial for possession of an unlicensed firearm. He was subsequently found guilty by a jury and sentenced to 13 years in prison.

Senior Crown counsel Candia James handed up to Magistrate Valdis Foldats what she described as “quite a volume” of screen messages sent by Barnes so that the court could get the flavor of the abusive messages and several threats to kill.

The magistrate asked how many messages had been sent and how often. “Every single day? A couple of times per month?” He said he could not pass an appropriate sentence without knowing such details.

Ms. James said she could not particularize, based on the way the messages had been retrieved, but, “On particular days, there was a bombardment of messages.”

The agreed frequency was “a number of times per month.”

Defense attorney Gregory Burke pointed out that some of the messages had dates and some had not. He emphasized Barnes’s guilty plea and his hope to avoid a consecutive sentence to what was already a lengthy period in custody.

Ms. James advised that the woman was seeking protection from further contact by Barnes.

The magistrate noted that the new Protection from Domestic Violence Law requires that an application be filed and a hearing held.

He said he had given thought to the sentencing a serving prisoner. He determined that a suspended sentence might have the desired effect of protecting the woman and having a real impact on Barnes.

“By complying with a suspended sentence, he gets his wish,” Mr. Burke agreed.

The magistrate pointed out that misuse of social media was very serious, but Barnes’s 13-year sentence was a long time. He could impose extra time or he could suspend a sentence. He said he was well aware of Barnes’s previous convictions and the difficulties he had faced. [Among them was the 2010 murder of his young son, who was shot while sitting in a car behind Barnes, who was the intended victim.]

“I think the way forward is to give you the chance not to have anything additional imposed. That serves the dual purpose – that you not commit any further offense, but more particularly that your wife isn’t bothered by you this way.”

On that basis he imposed a sentence of four months, suspended for two years.

Ms. James then withdrew a charge of threats to kill.