By Agence France-Presse
High Court Judge Anthony Mann said the BBC had infringed Richard's rights in a "serious" and "somewhat sensationalist way" and awarded him at least £210,000 ($274,000, 236,000 euros) in damages.
The 77-year-old singer, who was never charged with any offence, was applauded by fans as he left court, and they sang his hit song "Congratulations".
Britain's first home-grown pop star later said senior managers at the BBC "have to carry the can".
"If heads roll then maybe it's because it was deserved," he told ITV News. "It's too big a decision to be made badly. It was nonsense."
The BBC said it would consider an appeal, saying the ruling "represents a dramatic shift against press freedom and the long-standing ability of journalists to report on police investigations".
Richard's home was raided in 2014 as part of an investigation into an allegation of sexual assault involving a young boy dating back to the 1980s.
The BBC's live coverage, including a helicopter, was picked up around the world, but the singer was never arrested or charged and was told in 2016 there was insufficient evidence against him.
"My life was effectively turned upside down and my reputation, worldwide, was unnecessarily damaged," Richard said at the start of the case.
'Sorry for the distress'
The BBC heard about the investigation by South Yorkshire Police and cut a deal in which they agreed to delay breaking the story in return for a tip-off about the raid on Richard's home.
The judge awarded £190,000 in general damages plus another £20,000 "aggravated damages" because the BBC nominated the story for a "Scoop of the Year" award, which it did not win.
Richard is also entitled to further sums for the financial impact of the case, which will be decided another time.
The police force has already agreed to pay Richard £400,000 after settling a claim.
In a statement, the BBC said it was "sorry for the distress Sir Cliff has been through".
It admitted there were "things we would have done differently, however the judge has ruled that the very naming of Sir Cliff was unlawful".
"So even had the BBC not used helicopter shots or ran the story with less prominence, the judge would still have found that the story was unlawful; despite ruling that what we broadcast about the search was accurate," it said.
The ruling "will make it harder to scrutinise the conduct of the police and we fear it will undermine the wider principle of the public's right to know", it said.
"We don't believe this is compatible with liberty and press freedoms," the statement said, adding that it was "looking at an appeal".
Tony Gallagher, the editor in chief of Britain's best-selling The Sun tabloid, also railed against the "shockingly bad" ruling.
"Victory for (alleged) criminals and money-grabbing lawyers. Terrible for media," he tweeted.
In the House of Commons, an MP suggested formally changing the law to make it illegal for the media to name suspects until they are charged.
But Prime Minister Theresa May, who looked into the issue in her previous job as interior minister, expressed scepticism.
She noted "there may well be cases where the publication of a name enables other victims to come forward and therefore, to strengthen the case against an individual".
She said it was an "issue for careful judgement" in which both police and media must recognise their responsibilities.
Richard, who burst onto the pop scene in the late 1950s, is the third biggest-selling artist in British singles chart history, behind The Beatles and Elvis Presley.
His hits include "The Young Ones", "Living Doll", "Summer Holiday", "Mistletoe And Wine" and "The Millennium Prayer".
There has been a wave of accusations of historical sex abuse against prominent figures in Britain since 2012, when the late BBC presenter Jimmy Savile was revealed to be a serial paedophile.