Attorney General Dominic Grieve has defended his decision not to prosecute footballer Joey Barton for a series of online comments about John Terry ahead of his trial, insisting they would not jeopardise the case.

QPR midfielder Barton posted the remarks on Twitter on Friday after Terry, who has been accused of racially abusing Anton Ferdinand, was stripped of the England captaincy.

Mr Grieve said comments made "in bad taste" on Twitter were "neither here nor there" and would be judged only on whether they would prejudice a fair hearing.

"As far as I could see, in this particular case, whatever Mr Barton had been doing didn't seem to me, on the facts, to amount to creating the risk we have just been talking about," he told the BBC Radio 4 Today programme.

"I think it is a matter of common sense. If people put out into the public domain by publishing or by broadcasting material that might influence or prejudice the course of a trial by putting background material out that is prejudicial and irrelevant to the trial process, then that has the capacity to create the risk.

"Mere invective or unpleasantness doesn't necessarily meet that test, though in some circumstances it could."

After airing his views about Terry on the micro-blogging site, Barton added: "I'll probably get a letter now from 'the powers that be'."

He later returned to Twitter and defended his comments on the grounds of free speech.

Terry, who was removed from his role as England captain on Friday, denies the allegations and will stand trial in July, only days after Euro 2012 finishes.

The Attorney General is the Government's senior law officer, whose remit includes ensuring defendants facing criminal allegations receive a fair trial.