Media playback is unsupported on your device Media caption Attorney General Dominic Grieve: "Ignoring the judge's instructions is unacceptable behaviour"

Two jurors have each been jailed for two months for contempt of court after one posted a comment on Facebook and the other researched a case online.

Kasim Davey, 21, of London, wrote a strongly-worded Facebook message during the trial of a man for sex offences.

The High Court ruled he and Joseph Beard, 29, who was a juror on a separate fraud trial, "interfered with the administration of justice".

There have been two previous similar prosecutions of jurors.

After the attorney general was given permission to bring the cases earlier this year, Davey and Beard were summoned to the High Court where two judges heard the evidence against them before deciding whether they were guilty.

Strong language

Davey, from Palmers Green, north London, said he had sent the Facebook message last December as a result of "spontaneous surprise at the kind of case I was on".

His posting - containing strong language and an offensive word - suggested he was going to find the defendant guilty, said BBC News home affairs correspondent Danny Shaw.

Davey's Facebook post: read: "Woooow I wasn't expecting to be in a jury Deciding a paedophile's fate, I've always wanted to Fuck up a paedophile & now I'm within the law!"

Every attempt is made to try and warn jurors not to use the internet or social sites for any purpose in relation to the case Sir John Thomas

The judge at Wood Green Crown Court was alerted and Davey was discharged. The defendant, Adam Kephalas, was eventually found guilty of sexual activity with a child.

Davey told the High Court he was unaware he had been in breach of a formal order made by the crown court judge. He accepted he was not meant to discuss the case but believed he was only prohibited from using the internet to carry out research.

In their ruling, High Court judges Sir John Thomas and Mr Justice Sweeney said they rejected as "untruthful" Davey's contention that his message was not meant seriously.

They said it made clear to his Facebook friends "he would use his prejudices in deciding the case" and his choice of words "underlined his disregard of the duties he had undertaken as a juror".

In Beard's case, the High Court heard claims that he had wanted to find out how long the proceedings at Kingston Crown Court would take as he was worried they would drag on.

He was said to have researched the case via the Google search engine and told fellow jurors extra information about the number of victims of the alleged fraud.

The case was abandoned in November last year after more than five weeks when his activity came to light. The two defendants in the fraud case were later found guilty at a retrial.

'Undermining justice'

At the High Court, Sir John - who is shortly to take over as the Lord Chief Justice, the head of the judiciary in England and Wales - said "immediate custodial sentences are almost inevitable in cases of this kind".

It creates a risk that the defendant will be convicted or acquitted, not on the evidence, but on unchallenged and untested material discovered by the juror Dominic Grieve, Attorney general

In his ruling, he said that "every attempt is made to try and warn jurors not to use the internet or social sites for any purpose in relation to the case".

He added: "They have done this so that no juror can subsequently claim that he or she did not understand what they should not do and what the consequences might be."

But Sir John said he would invite courts to consider whether a practice adopted by some judges of also handing out a printed notice should be "universally followed".

Speaking after the case, Attorney General Dominic Grieve said jurors who use the internet to research a case "undermine justice".

Mr Grieve added: "It creates a risk that the defendant will be convicted or acquitted, not on the evidence, but on unchallenged and untested material discovered by the juror.

"Equally, the case of Kasim Davey shows that jurors must follow the directions given to them by the trial judge not to discuss the case outside the jury room, including discussions and posts on the internet."