An under-fire police force has been branded "inept" by a group of MPs over its handling of a highly-publicised raid on the home of pop star Sir Cliff Richard.

South Yorkshire Police, which has faced severe criticism in recent weeks over its record on dealing with child sexual abuse, worked exclusively with the BBC to broadcast live footage of officers searching Sir Cliff's home in Berkshire in August.

In a report, the Home Affairs Select Committee said the police force should have refused to cooperate and explained to senior BBC News executives why broadcasting the story could have prejudiced the investigation.

But the BBC does not emerge unscathed from the committee report, with MPs hitting out at the corporation's decision not to allow the reporter behind the story, Dan Johnson, to appear before the committee.

And a statement from Sir Cliff's lawyers, released to coincide with the report, said the BBC coverage caused "immeasurable harm" to their client.

In addition, the MPs did not accept the BBC's denial that Mr Johnson told South Yorkshire Police that a person connected to Scotland Yard's Operation Yewtree was behind the original tip-off about the investigation into Sir Cliff.

Committee chair Keith Vaz said e-mail exchanges between the force and the BBC could have been mistaken for a "script from The Bill".

He said: "South Yorkshire Police's handling of this situation was utterly inept.

"The force allowed itself to hand over sensitive information to a journalist and granted him privileged access to the execution of a search warrant."

He went on: "The force should have refused to cooperate and explained to senior BBC News executives why the premature broadcasting of a story, which they claimed the journalist threatened, would have prejudiced the investigation."

Officers searched the 74-year-old's home after receiving an allegation of a sexual nature dating back to the 1980s involving a boy who was under the age of 16.

A crew was outside the gated development in Sunningdale where Sir Cliff has a penthouse apartment before police arrived.

South Yorkshire Police argued that it worked with Mr Johnson in order to prevent early publication of the story, which could have jeopardised its inquiry.

The committee said the force should have contacted "more senior people at the BBC" to explain the situation, rather than "trying to cut a deal" with a single reporter.

The group of MPs said it found "nothing wrong" with the BBC decision to run the story given that it had information about the investigation, as well as the timing and location of the search.

But the committee said it was "unfortunate" that a subsequent analysis piece on the BBC website had given the false impression South Yorkshire Police had worked with the media outlet to generate publicity for the force.

The report also criticised the BBC's decision not to allow Mr Johnson to appear before them, adding "the BBC have chosen to hide their reporter behind his superiors, issuing equivocal denials on his behalf".

South Yorkshire Police told MPs that Mr Johnson had claimed the tip-off about the investigation came from Scotland Yard's Operation Yewtree, the investigation into allegations against Jimmy Savile and others.

But Mr Johnson denies making any such claim.

The committee did not accept this.

The report said: "It seems likely to us, on balance, that Mr Johnson did indeed indicate to South Yorkshire Police that he had detailed knowledge of the investigation, beyond the name of the suspect, and that, whether by act or omission, he gave them the clear impression that his source was Operation Yewtree."

A statement from Sir Cliff's lawyers said: "We feel that it is necessary to record that, leaving aside the actions of the police, the actions of the BBC have also caused very serious harm to our client at a time when he had not been interviewed by the police, or of course arrested or charged.

"Against this backdrop, we believe that it would be inappropriate to hold that the BBC has 'behaved perfectly properly', as suggested at the hearing of September 2.

"As stated in our letter of September 1 2014 we do not feel it appropriate to say more while there is a live investigation ongoing, but felt that it would be wrong not to place on record at this stage our concern regarding the BBC, whose coverage has led to immeasurable harm to our client and was both premature and disproportionate."

The group of MPs also highlighted the "enormous, irreparable damage" suffered by Sir Cliff, given he had not been arrested or charged.

"We have seen recently in the press that Sir Cliff has considered selling his home, which he only bought in 2008, because of the way the operation was carried out, and we can understand his feelings," the report said.

"No citizen should have to watch on live television their home being raided in this way."

The chief constable of South Yorkshire Police, David Crompton, previously apologised to Sir Cliff if the force was ''insensitive'' about the search of his home.

Mr Crompton said the BBC had approached his force with detailed information about their inquiry, and staff were convinced that the broadcaster would run a story without some kind of deal.

A BBC spokesman said: "The committee chairman has already said that the BBC acted 'perfectly properly' in handling this story, and we're pleased today's report confirms this."

He added: "Our reporter said very clearly he did not reveal his sources to South Yorkshire Police.

"We stand by his account."

Scotland Yard said it had found no evidence to substantiate the "damaging" and "unfounded" allegation that Operation Yewtree was the source of leaked information to the BBC.

Pointing out the report's findings of a contradiction between the BBC and South Yorkshire Police's claims about the tip-off, the force added that its Directorate of Professional Standards found there were other people outside of policing who were also in possession of the information.

The statement added: "Any suggestion or speculation that the MPS may have been responsible for the leak of information to the BBC about such a sensitive and live investigation causes us grave concern.

"Officers who have responsibility for Operation Yewtree have worked for years to build trust amongst the victims of abuse, giving many of them the confidence to speak out and report offences.

"Over the last two years the Yewtree team has routinely handled and received a significant amount of information and intelligence that is high-profile, sensitive and newsworthy, none of which has come into the public domain. Indeed, the MPS has faced criticism from the media for not providing them with greater levels of information.

"If any further information comes to light that allows us to investigate this matter further we will of course do that."

South Yorkshire Police said their actions were "ultimately flawed" and the force had changed the way it dealt with media inquiries about high-profile cases.

A statement said: "Whilst we believe our actions in relation to dealing with the media were within policy and were well intended, they were ultimately flawed and we regret the additional anxiety which was caused to Sir Cliff Richard.

"South Yorkshire Police has changed the way it deals with this type of media inquiry. In high-profile cases, the force no longer provides privileged briefings to reporters, nor does it confirm information which media sources seek to verify.

"We are fully co-operating with the Metropolitan Police investigation regarding the original source of information."