Dubbed the "Fake Sheikh", Mazher Mahmood has spent 25 years as an undercover reporter with everyone from celebrities to royals caught up in his famous exposes.

But serious doubt has been cast over his credibility and his career hangs in the balance after a judge ruled he lied under oath in the trial of former X Factor judge Tulisa Contostavlos.

Known to his colleagues simply as Maz, the reporter claims to have helped put more than 100 criminals behind bars and risked his life on a daily basis to lift the lid on the murky world of crime.

Paedophiles, arms dealers and drug dealers have all found themselves at the centre of Mr Mahmood's stories. So too have celebrities and public figures, including the Countess of Wessex who was taped calling the Queen "the old dear", and Sven-Goran Eriksson who revealed his plans to quit as England manager.

Ms Contostavlos was the latest star to be caught up in one of his stings, apparently filmed caught promising to arrange a cocaine deal.

But Judge Alistair McCreath dramatically called a halt to the singer's trial and laid the blame for its collapse squarely at Mr Mahmood's feet.

He told the packed courtroom at London's Southwark Crown Court that "there are strong grounds for believing Mr Mahmood told me lies when he gave evidence to me" during pre trial legal hearings.

Mr Mahmood's reliability was thrown into doubt because of evidence he gave about his driver, Alan Smith, who picked Tulisa and her friends up from a hotel.

Mr Smith told police he overheard Ms Contostavlos say she "disapproved" of drugs but later changed his statement after speaking to Mr Mahmood.

The undercover reporter had strongly denied talking to Mr Smith about his statement in pre legal hearings, but changed his tune at the singer's trial and admitted he had spoken to him about his statement.

Judge McCreath said his answers in cross examination were "entirely inconsistent" with his earlier account.

The trial had promised to uncover the illicit drug dealing of one of Britain's most famous female popstars. But it was Mr Mahmood's journalistic practices that most came under the spotlight.

He told the court he began probing Contostavlos after receiving a tip-off that she "arranges drugs for a close circle of friends".

But he was forced to deny accusations from Contostavlos's barrister Jeremy Dein QC that he entrapped celebrities, bent the truth and invented sources to create "big-time, glamorous stories which enhance your reputation and the paper".

In a series of legal arguments, Mr Dein accused Mr Mahmood of having a "long and chequered history" and of "inventing informers and for creating factual scenarios which are not true".

He said the journalist "tricked and deceived" Contostavlos by wining and dining her at five star hotels and luxury restaurants in a "campaign of entrapment".

To support his case he called former tipster and Kosovan asylum seeker Florim Gashi, who claims to have made up a string of stories with Mr Mahmood at the now defunct News of the World.

Mr Gashi told the court: "Everything was pre-planned from Maz and basically I was involved in assisting him, helping him make up stories for his newspaper."

He said a front-page story in the News of the World in 2002 in which Mr Mahmood claimed to have exposed a plot to kidnap ex-Spice Girl Victoria Beckham and hold her ransom for £5 million, was a set-up.

Five men were arrested but later cleared when the prosecution case collapsed after it was revealed Mr Gashi had been paid £10,000 for the story despite having criminal convictions to his name, and was therefore deemed an unreliable witness.

Questioned about the story, Mr Gashi told the court: "There was nothing genuine in regards to kidnapping Victoria Beckham. This plan originated from Mazher Mahmood and I assisted him to my best to make this story happen."

He accused Mr Mahmood of throwing away tape recordings if they contradicted a story and luring people into committing crimes.

Giving evidence behind a screen to protect his identity, Mr Mahmood vehemently denied the claims and insisted he always took legal advice.

He said: "The information was that she supplies drugs to her friends. She supplied drugs to me - simple."

But the matter was far from simple and Mr Mahmood has been suspended pending a full investigation following the case's collapse.

And he will have to defend himself from the claim made by Ms Contostavlos that he was "openly lying" to the judge and jury.