An undercover Sun journalist who dubbed himself "the king of sting" has gone on trial accused of tampering with evidence in the collapsed drugs trial of Tulisa Contostavlos.

Mazher Mahmood, 53, known as the "Fake Sheikh", allegedly plotted with his driver Alan Smith, 67, to change a statement made to police about the pop singer's negative attitude towards drugs.

Mahmood, of Purley, and Smith are on trial at the Old Bailey for conspiracy to pervert the course of justice over the trial of Miss Contostavlos in 2014.

She had allegedly arranged for the journalist to be sold half an ounce of cocaine by one of her contacts for £800.

Mahmood had a "vested interest" in her prosecution, which put his journalistic reputation on the line, prosecutor Sarah Forshaw QC said.

He had posed as a film producer who wanted the aspiring actress to star as a "bad girl" in a Hollywood blockbuster alongside Leonardo DiCaprio, the court was told.

Mahmood handed evidence to police which led to Miss Contostavlos being arrested and charged with being concerned in the supply of a class A drug, the court was told.

The reporter was to be called as a prosecution witness in the trial and was called to give evidence in a pre-trial hearing about his methods during the sting.

Miss Forshaw said: "In effect, the hearing in June 2014 put Mr Mahmood and his journalistic process on trial.

"He liked to call himself the king of sting, he boasted in a book he had written of the number of convictions that he personally was responsible for.

"He knew that if it could be shown that he had acted improperly as an agent provocateur, inducing Miss Contostavlos to do something she would not otherwise do, his own credibility and standing and the prospect of conviction in the case might both be severely damaged."

Mahmood and Smith allegedly arranged to alter a written statement the latter had made to police because it was favourable to Miss Contostavlos's defence.

Miss Forshaw said: "Miss Contostavlos had expressed her disapproval of hard drugs to his own driver, that was the bit of the statement that was altered."

She added: "Mr Smith had told the police officer making the statement that he remembered that while driving Miss Contostavlos and her two friends home from a meeting with Mr Mahmood that she had spoken about someone in her family being dependent on cocaine.

"Mr Smith told the officer that Miss Contostavlos had seemed really negative about cocaine and expressed her disapproval of drugs."

A day after making the statement Smith told police he wanted to retract the part about the singer's negative attitude to cocaine, the court was told.

In the intervening 24 hours he had allegedly sent a copy of his interview to Mahmood and they had exchanged a number of texts and calls.

During a pre-trial hearing at Southwark Crown Court, Mahmood said on oath that he had not spoken to Smith about Miss Contostavlos's comments.

"He deliberately misled the court - not only had he discussed it but he had been sent a copy of the statement," Miss Forshaw said.

While giving evidence to the jury in the case, Mahmood admitted he had seen a copy of Smith's statement and the trial subsequently collapsed, she added.

Mahmood and Smith, of Dereham, Norfolk, are charged with conspiring together to do an act, namely that Smith would change a draft statement to police, with the intention to pervert the course of justice, between June 22 and July 22, 2014.

They both deny the charges. The trial continues.