The Metropolitan Police breached the journalists' human rights when it seized data from three of the tabloid's reporters to identify their source of information about Plebgate, the Investigatory Powers Tribunal ruled on Thursday.
The tribunal agreed with the tabloid that this was a breach of protection of freedom of expression, guaranteed by the European Convention on Human Rights (ECHR), which is enforceable before UK courts thanks to the Human Rights Act (HRA).
The paper announced it was going to the tribunal in October 2014, telling HuffPost UK it would rely on the HRA, just after it splashed on its demand that the "hated" law be axed.
The HRA has become something of an pariah within the right-wing press, which often dub it "Labour's Human Rights Act" and paint it as protecting rights of criminals rather than ordinary people.
The Conservatives pledged to abolish it in their election manifesto and replace it with a "Bill of Rights" but so far have not done so.
Following the tribunal's ruling, a Sun spokesman said: "We are pleased that the specialist Tribunal has today ruled that the Police's actions in secretly accessing the telephone data of The Sun and three of its journalists was in breach of our rights to protect our confidential sources.
"Today's outcome vindicates our concerns that our rights to protect confidential sources on matters of significant public interest - such as 'Plebgate' - are at risk unless the law is now changed to protect all journalists from unfair and unnecessary police intrusion."
He confirmed The Sun still supported abolishing the HRA.
He added: "The Human Rights Act had no provision for preventing the police from using covert powers to access The Sun's telephone data and therefore, while we have used the HRA in this instance to confirm that such action was unlawful, The Sun continues to support a proper Bill of Rights that includes protections for confidential sources."
Speaking after The Sun first launched its action, barrister Harriet Johnson told HuffPost UK: "It is interesting to note their argument that because this alleged breach has happened while the HRA was in force, it somehow supports the argument for repealing it - rather than the argument for keeping it.
"That's like having your wallet stolen and saying 'criminal laws are clearly useless, let's repeal them...'."
The Sun's headline last year, in which it referred to the HRA as 'hated'
The targeted journalists were Tom Newton Dunn, Anthony France and Craig Woodhouse. A detective superintendent authorised the interceptions because he feared Met officers had conspired to bring down then-chief whip Andrew Mitchell, who had reputedly called Downing Street police officers "a fucking pleb".
The same officer even invited Mr Newton Dunn to an interview under police caution over the issue. The source, a police officer who was not paid for the information, was eventually identified and sacked.
The Tribunal ruled one of the four authorisations to intercept phone data was not "proportionate" and therefore breached the ECHR.
Assistant Commissioner Patricia Gallan, who oversaw the Met's investigation into its officers' behaviour surrounding Plebgate, said the Regulayory Investigative Powers Act (RIPA), under which the police sought the phone data, was "hugely complicated".
She added: "We welcome the ruling of the IPT that our use of RIPA was necessary, proportionate and lawfully applied in three of the four cases and we respect the decision with regard to the fourth.
"We recognise the level of concern from the media regarding journalistic privilege that this case sparked. All the RIPA applications were made in good faith."