The High Court has rejected a third attempt to lift an injunction preventing journalists from naming a married footballer who is alleged to have had an extra-marital affair with Imogen Thomas, a former reality television contestant.

The ruling came hours after an MP used parliamentary privilege in the House of Commons to name Ryan Giggs as the footballer and after the Manchester United midfielder's identity had been widely reported for days on the social networking site, Twitter.

Rejecting a renewed bid by News Group Newspapers to lift the anonymity order following the intervention by the MP John Hemming, Mr Justice Tugendhat ruled that the politician's comments in parliament actually served to bolster the player's case that he needed protection.

"It is obvious that if the purpose [of the injunction] was to protect a secret then it would have now failed – but as it is to do with harassment it has not failed," said the judge.

He said that Hemming's comments served to "increase, not decrease, the strength of his [the footballer's] case that he needs protection," adding that the injunction was "still effective".

The judge said of the MP: "It looks as if he — like many commentators — thinks this is about secrecy.

"If it is a government secret, once the information is out there is nothing left to protect. But with personal information once you taunt someone, the more distressing it becomes.

"If a court can stop one person or five people.... — not 50,000 — is there not something to be achieved?"

On anonymity, he added: "That went long ago. No one has proposed it is a secret for days and days and days."

After a first attempt on Monday, News Group Newspapers, which publishes the Sun and the Times, went to the court earlier in the day to get the privacy injunction lifted hours after the Prime Minister, David Cameron, said "everybody knows" who the footballer is. The injunction prevents the media reporting details of the footballer's alleged extra-marital affair with Thomas, a model and former Miss Wales.

But Mr Justice Eady, the High Court judge who listened to the application, dismissed it after a one-hour hearing.

Mr Justice Eady said the right question to ask was whether there was a solid reason why the footballer's identity should be generally revealed in the national media, such as to outweigh the legitimate interests of himself and his family in maintaining anonymity.

"The answer is as yet in the negative. They would be engulfed in a cruel and destructive media frenzy."

Referring to that judgment, Mr Justice Tugendhat said: "This is not about secrecy, this is about intrusion."

He added: "Ideally, if injunctions really worked it would be about secrecy but it's not — it's about harassment. So what's changed?"

News Group Newspapers had, he said, asked him shortly after 5pm to hear a further application for the anonymity to be removed following Hemming's comments.

"As the public now know, anyone who wanted to find out the name of the claimant could have learned it many days ago," he said.

"The reason is that it has been repeated thousands of times on the internet, and News Group Newspapers now want to join in."

Hemming, the MP for Birmingham Yardley, used a question to the attorney general, Dominic Grieve, to name Giggs in parliament.

The Liberal Democrat, who was rebuked by Commons speaker John Bercow, made the intervention after Grieve announced that David Cameron had requested a joint committee of peers and MPs to investigate the use of gagging orders.

It came amid warnings from one influential Conservative MP that the actions of thousands of people posting details on Twitter of individuals involved in superinjunctions risked making the law "look an ass".

To the condemnation of some of his colleagues, Hemming, who has been campaigning on the issue, exercised parliamentary privilege to identify the star at the centre of the injunction just minutes after the high court refused to lift a ban on naming the sportsman.

"With about 75,000 people having named Ryan Giggs on Twitter, it's obviously impractical to imprison them all," Hemming said.

Moments after Hemming had named Giggs, Bercow interrupted to tell the MP: "Let me just say to the honourable gentleman, I know he's already done it, but occasions such as this are occasions for raising the issues of principle involved, not seeking to flout for whatever purpose. If the honourable gentleman wants to finish his question in an orderly way, he can do so."

In a statement released later, Hemming said he took the decision to name Giggs because the player's lawyers were taking action against Twitter.

He said: "When he sued Twitter, it was clear what he was doing. He was going after the ordinary people who have been gossiping about him on Twitter."

"To prosecute someone for contempt of court is quite a serious step. It comes with an up to two-year jail sentence."

"I have spoken to people of ordinary means who have received these injunctions. I have also spoken to people who faced jailing in secret hearings and who were subject to anonymity orders themselves.

"This is a really oppressive system."

"So on one side you have a footballer upset that people are gossiping about him and on the other side you have ordinary people facing the threats of a two-year jail sentence."

"I think it is wrong that he has the power to do this, but at least if he is going to do this, let him be held to account. Before he sued Twitter, there was no public interest in naming him."

"However, when his lawyers decided to go on a 'search and destroy' against the ordinary people who gossip on Twitter, he had taken a step that should not be done anonymously. In Burma they jail people for criticising the king and people here are up in arms. Here they threaten to jail people for criticising a footballer and the lawyers say I should not name the footballer."

Lawyers for Giggs had previously obtained a High Court order asking Twitter to reveal details of users who had revealed his identity after thousands named him in recent days.