When South Yorkshire Police raided Sir Cliff Richard's home in August 2014, he was in Portugal, but the BBC was outside, with a helicopter standing by.

News programmes broadcast pictures and named Sir Cliff as a suspect in an alleged historical sexual assault.

Correspondent Dan Johnson had arranged in advance with South Yorkshire Police that the BBC would be outside the gated property.

Sir Cliff denied the allegation, was questioned but was never arrested or charged.

He sued the police force and the BBC for breach of privacy and data protection.

The force settled the case against it - paying substantial damages - and apologised to the star for the "distress and humiliation" caused by disclosing his private information to the BBC.

The BBC has said it is very sorry for the distress caused to Sir Cliff by its coverage of the raid, but is contesting his legal claim.

Sir Cliff's case against the BBC has enormous importance in determining whether anyone under investigation by the police can lawfully be identified by the media before they are charged.

Accordingly, it also has massive implications for the way in which the media is allowed to report the early stages of a police investigation.

It centres on Sir Cliff's right to privacy under Article 8 of the Human Rights Act.

It will decide whether that right was breached, and if so, whether the BBC was entitled, in the public interest, to exercise its right to freedom of expression (Article 10 of the same Act) to identify Sir Cliff and broadcast details of the police investigation and search of his home.

Sir Cliff Richard's case

Because Sir Cliff had not been interviewed, arrested or charged at the time of the raid, he argues that he had a right to anonymity which the BBC should have respected.

He also argues that the manner of the BBC's coverage of the investigation and search was itself a breach of his privacy because it was excessive and disproportionate.

Sir Cliff claims the BBC's coverage was shocking, humiliating and distressing for him, and that it caused him to put his home up for sale, threw his creative and business plans into disarray, and led to him incurring legal costs of around £1m.

Privacy law is relatively new and still developing. There was no statutory right to privacy in UK law until the Human Rights Act 1998.

The law was then developed by judges through a series of cases that had nothing to do with police investigations.

They involved, among others, the model Naomi Campbell who sued the Daily Mirror for publishing a photograph of her leaving a drug treatment centre in 2001, and the former Formula One boss Max Mosley who took action against the now-defunct News of the World after it published pictures and a video of him in a sex session with prostitutes.

The cases established that individuals have a "reasonable expectation of privacy" in relation to certain areas of their lives, including health and addiction issues, and sex.

Once that "reasonable expectation" is established and a person's Article 8 rights are engaged, the media are only entitled to breach them if there is an overriding public interest.

The court will apply what it calls "an intense focus" to the balance between the individual's right to privacy on the one hand, and the media's right to freedom of expression on the other.

Sir Cliff Richard's case is expected to provide clarity on the privacy rights of individuals in the early stages of a police investigation - prior to any charges being brought - and what the media can and cannot report.

This is of particular interest in the internet age when reputational damage to a suspect who is innocent can be instant and widespread.

The BBC's case

The BBC's defence is in two parts.

Firstly, it denies that Sir Cliff had a reasonable expectation of privacy in relation to the material it broadcast, or that its coverage was sensational or intrusive.

It denies that Sir Cliff had a right to anonymity by virtue of not having been arrested, interviewed or charged. It claims that there is no right to anonymity in law.

Secondly, it argues that if Sir Cliff did have a reasonable expectation of privacy, there was an overriding public interest in its coverage of the police investigation and search.

Here it claims that publicising police investigations ensures scrutiny of the police, that justice is seen to be done, and that people of wealth and influence are treated equally under the law.

It claims there is a particularly strong public interest in publicising investigations into historical sexual abuse where in the past victims have not come forward, or have not been believed by those in authority.

Past failures have caused public disquiet and debate, and the publicity given to such investigations has caused victims to come forward.

The BBC case sets out that it only broadcast the search after a magistrate's warrant had been obtained by SYP, and the force had voluntarily confirmed to BBC reporter Dan Johnson that Sir Cliff was being investigated.

The force claims it was pressured into co-operating with the BBC by Dan Johnson.

The BBC also claims that what it published was limited to material that enabled the public to know what the investigation was about, and that it included Sir Cliff's denial of the allegation as soon as it was available.

In other words, it argues that any interference with Sir Cliff's right to privacy was proportionate and justified in the public interest.

The case is due to last two weeks. Judgment will be reserved, and is eagerly awaited by both media organisations and those who are or might one day find themselves under investigation by the police.