A man has been jailed for 18 weeks for bombarding a Labour MP with abusive tweets after she supported a successful campaign to put the image of Jane Austen on the £10 note.

Peter Nunn, 33, from Bristol, retweeted menacing posts threatening to rape Stella Creasy, the MP for Walthamstow, and branding her a witch.

He launched what the prosecution called his “campaign of hatred” last summer after the Labour politician backed a high-profile drive by the feminist activist Caroline Criado-Perez to keep a woman on a British banknote.

The district judge Elizabeth Roscoe found Nunn guilty of sending indecent, obscene or menacing messages following a trial at City of London magistrates court this month, and jailed him on Monday.

She also imposed a restraining order banning him from any contact with Creasy or Criado-Perez. Nunn showed no emotion as the sentence was passed.

Victim impact statements were read out to the court on behalf of both women, who spoke of the “terrifying” threats made against them.

The prosecutor Alison Morgan said the messages had a “substantial” effect on Creasy, who felt “increasing concern that individuals were seeking not only to cause her distress but also to cause her real harm which led her to fear for her own safety”.

She said Creasy had felt the need to install a panic button in her home, and the incident had altered the way the MP interacted with people and made her more cautious.

Morgan said Criado-Perez’s statement described the “fear and horror” she had felt, which led to physical symptoms such as dizzy spells.

Nunn, who the court heard has ambitions to study for a law degree, claimed he sent the messages to exercise his right to freedom of speech and to “satirise” the issue of online trolling.

During mitigation his defence lawyer, Helen Jones, told the court he felt great remorse for the stress and anxiety he had caused.. But the judge said she had not seen this during his trial when she had found him “evasive”.

Describing his behaviour as “egocentric”, Roscoe added: “It was really all about you and your opinions and what you wanted to do. Although we’re only talking about six tweets, it was persistent. You moved account when one was blocked.”

The judge said she had taken the defendant’s good character and clean record into account along with the impact that a custodial sentence would have on his long-term partner and their three-year-old daughter.

She added: “However, it has to be an immediate sentence. There is no reason to suspend it. I’m not convinced that that would give the message that this is entirely unacceptable.”

Nunn’s one-day trial heard how he began leaving offensive posts on 29 July last year, five days after the Bank of England revealed Austen would be the new face of the £10 note. He retweeted a threat to rape Creasy, and over the next day he sent a barrage of offensive messages using the Twitter account @protectys.

Later that evening he wrote: “If you can’t threaten to rape a celebrity, what is the point in having them?”

Nunn also posted six increasingly manic videos online in which he mocked campaigners.

Nunn, who declared himself a “feminist” during his own evidence, denied using Twitter to advocate violence or rape. He was found guilty of sending a message that was grossly offensive or of an indecent, obscene or menacing character by a public electronic network between 28 July and 5 August last year.

Neither Creasy nor Criado-Perez attended court to see him sentenced.

Creasy said: “Today’s sentence for Peter Nunn is a step forward in recognising the distress and fear online harassment can cause. We now need to ensure our police and criminal justice services are better trained to identify the risks anyone receiving threats faces, whether these are made on or offline so that we can protect those being stalked.

“Above all, we need to send a clear message that it isn’t for anyone to put up with being harassed via any medium- this is an old crime taking a new form online and should be treated as such.”

Criado-Perez said Nunn “made me fear for my life – as no one ever has before”. But she said she felt the charge against him had been the wrong one, and said of the Crown Prosecution Service: “I don’t feel they understood what happened to me.”

She wrote on her blog: “While what Nunn did was extremely menacing, I do not think that sending messages describes the essence of his campaign against me and Stella. I think that is better described with the term stalking … I felt he was a clear and present threat to me. He made me scared to go outside, to appear in public. He seemed obsessed enough to carry out his threats.”