Sally Bercow said she was "surprised and disappointed" after the high court ruled that she defamed the Tory peer Lord McAlpine by falsely suggesting on Twitter that he was a paedophile.

The Commons Speaker's wife had always defended her tweet – "Why is Lord McAlpine trending? *innocent face*" – about the former Tory treasurer in November last year, following allegations on BBC 2's Newsnight about an unnamed high-profile politician. But on Friday she admitted that she regretted her "conversational and mischievous" message and said: "On this, I have learned my own lesson the hard way."

Her climbdown came after Britain's most senior libel judge, Mr Justice Tugendhat, ruled that the tweet was seriously defamatory of McAlpine and had falsely tarred him as a paedophile.

He said in his judgment: "I find that the tweet meant, in its natural and ordinary defamatory meaning, that the claimant was a paedophile who was guilty of sexually abusing boys living in care. If I were wrong about that, I would find that the tweet bore an innuendo meaning to the same effect."

Neither Bercow nor McAlpine were in court for the judgment, which ended a six-month legal saga prompted by a disastrous Newsnight report containing allegations about an unnamed Tory politician. The BBC and ITV later paid out £310,000 in libel damages to McAlpine and dozens of Twitter users made donations to charity over the false claims.

In a statement following the ruling, Bercow said she had accepted McAlpine's offer to draw a line under the matter and settle out of court. But she added: "To say I'm surprised and disappointed by this is an understatement.

"Today's ruling should be seen as a warning to all social media users. Things can be held to be seriously defamatory, even when you do not intend them to be defamatory and do not make any express accusation. On this, I have learned my own lesson the hard way." She described the legal wrangle with McAlpine as a "nightmare" and added: "I am sure he has found it as stressful as I have."

In his judgment, Tugendhat said there was no sensible reason for Bercow to include the words *innocent face* in her tweet, which sensible readers among her 56,000 followers would have understood to be "insincere and ironical".

He decided that her tweet "provided the last piece in the jigsaw" and allowed readers to wrongly link McAlpine with the allegation of child sexual abuse. "It is an allegation of guilt. I see no room on these facts for any less serious meaning."

Bercow's barrister, William McCormick QC argued at an earlier hearing that Twitter was simply a place where people share "random thoughts without necessarily meaning anything". However, the judge found that her followers would mostly be interested in politics and current affairs, so will have known McAlpine as a leading politician in the 1970s and 1980s.

The judgment will be yet another warning to Twitter users over what they post on the 140-character social network, after several others have found themselves in trouble with the law over off-hand remarks.

McAlpine's solicitor, Andrew Reid, said the case demonstrated that "Twitter is no different to real life" and added: "People have got to realise that this is not a coffee table. They're not in their own home. Their actions can harm a lot of people even if they don't intend that to be so. What is worse is that once a tweet is put there, it's there forever; it can't be taken down."

Reid said the legal case had been "a great strain" on McAlpine and that Bercow had not acted "honourably" unlike other Twitter users who quickly agreed to settle the matter, including the Guardian columnist George Monbiot who apologised quickly and agreed to undertake three years charity work in recompense.

Legal experts said Bercow was wise to settle out of court with McAlpine as the level of damages was likely to be high, reflecting the gravity of the allegation. "The principles of free speech are in no way affected," said Gerard Cukier, a media Law partner at the London law firm Kingsley Napley LLP.

"Anyone is entitled to comment freely on any matter of public interest as long as the comments can be recognised as comments – as opposed to statements of facts or imputations such as the judge held Bercow's comments to be - and as long as the comments are based on facts which are true."