Trial comes after Tulisa allegedly arranged for half an ounce of cocaine to be delivered to undercover Sun journalist.

Undercover reporter Mazher Mahmood had his face covered as he arrived at the Old BaileyPA

The undercover journalist known as the "Fake Sheikh" tampered with evidence in the drugs trial of former X Factor judge Tulisa Contostavlos to protect his reputation as the "King of Sting", a court heard on Wednesday (21 September).

Mazher Mahmood, 53, a reporter for The Sun newspaper, is accused of plotting with his 67-year-old driver, Alan Smith, to change a witness statement made to police in the collapsed trial of the former N-Dubz singer.

The pair are on trial at the Old Bailey for conspiracy to pervert the course of justice.

The prosecution said the evidence in the case is "overwhelming", and added: "Mr Mahmood may be the master of subterfuge and deception. But on this occasion it is he – together with his employee – who are exposed."

The court heard how Tulisa, 28, was targeted in December 2012 by Mahmood, who posed as an influential film producer wanting to cast the aspiring actress in a Hollywood blockbuster alongside Leonardo DiCaprio.

She was said to have then organised for half an ounce of cocaine to be delivered to Mahmood by one of her contacts for £800.

Mahmood then ran the story on the front page of the Sun on Sunday, in July 2013, and handed evidence to the police, leading to the singer being arrested and charged with the supply of a class A drug.

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

Prosecutor Sarah Forshaw QC told the Old Bailey Mahmood had a "vested interest" in her prosecution, which put his journalistic reputation on the line.

She 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."

The drug trial against Tulisa Contostavlos collapsedGetty

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

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 Tulisa's comments.

"He deliberately misled the court – not only had he discussed it but he had been sent a copy of the statement," 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.

Forshaw told the jury: "There is no doubt that Smith did change his statement. That change was from a truthful version of events to an untruthful one.

"The change would undoubtedly have disadvantaged Miss Contostavlos's case. It would have deprived her of supporting evidence from Mahmood's own right-hand man that she made an anti-drugs comment at a time when untainted by any influence or pressure."

Mahmood told police he had "no reason" to ask Smith to change his statement.

"I had gathered verifiable evidence that Miss Contostavlos arranged the supply of cocaine and that was all that mattered with regards to the case," he added.

He later said in a written statement to police that Smith had sent him a copy of his statement because he wanted to correct a mistake in it.

He stated: "I did not discuss the nature of the evidence he could give or the circumstances of the conversation he had in the car."

Smith told police he did not discuss the "content" of the statement with his co-defendant, and added: "Mahmood has not influenced me in any way to change my account prior to the trial."

Mahmood and Smith both apparently tried to destroy evidence in the case, including Smith "dropping a car" on the phone he had used to text his former boss, Miss Forshaw added.

Mahmood, of Purley, south London, and Smith, from 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.

Who is the 'Fake Sheikh'?

The prosecutor said jurors might have heard of Mahmood as the "Fake Sheikh" because of his elaborate disguises. His notable previous targets have been George Galloway, Sven-Goran Eriksson and Jerry Springer.

Prosecutor Sarah Forshaw QC said: "He would lure his target with a fictional story, deceiving them into believing he was someone who could offer them something they wanted - a part in a blockbuster movie for example.

"Then, when that targeted individual wishes to impress him, he would invite them to take part in a criminal offence.

"So it was with Tulisa Contostavlos. He asked her to arrange for him to be supplies with a Class A drug - cocaine. He carried a secret recording device.

"One he had his explosive story, he handed some of his evidence over to police and became a witness for the prosecution against Tulisa Contostavlos, the defendant."