A judge has severely criticised magistrates in Haverfordwest and the Crown Prosecution Service for presenting him with a "shambles" of a case.

Judge Peter Heywood said he was staggered that they had accepted Bryan Mathias' version of events, after police had caught him red handed running drugs into Pembrokeshire.

Mathias had been caught with ecstasy tablets with a street value of up to £836, two wraps of cocaine, £354 in cash, two mobile telephones and a bank card belonging to someone else.

At Haverfordwest magistrates court he offered a plea of guilty to possessing the ecstasy with intent to supply, but only on the basis that he was a heavy user and, apart from giving someone else a few, would have consumed all the tablets himself.

Mathias, aged 28, of Leonardston View, Neyland, appeared at Swansea crown court today (Wednesday).

Judge Heywood said his hands were now tied as the basis of plea had been "negotiated and accepted" by both the CPS and Haverfordwest magistrates.

"It would be wrong for me to now interfere but I would not have accepted that it was non commercial dealing," he added. "I would not have entertained it.

"I hope more care is given in the lower courts when basis of pleas are offered."

Judge Heywood said the CPS could have taken Mathias to trial where, in his opinion, there was a reasonable possibility of Mathias being convicted of being involved in the commercial supply of drugs.

Judge Heywood said that, because of the acceptance of the basis of plea, he could not even confiscate the £354 cash. He was told by Nicola Powell, prosecuting, that the money had already been returned to Mathias.

"It's staggering. The whole thing is a shambles," he added.

The judge told Mathias he would have received an immediate prison sentence of around 18 months to two years had he been found guilty of commercial supply.

"I now feel somewhat constrained," he added.

It emerged that the CPS had sent Swansea crown court two different letters both with the same date-one said they accepted Mathias' basis of plea, the other said they didn't.

Miss Powell said police stopped Mathias on May 28th last year as his Audi approached the Cleddau Bridge. A search revealed a bank card in the name of another person and he was arrested. A more thorough search of his car uncovered 209 ecstasy tablets, the cocaine, the cash and the mobiles.

Mathias said he took up to 15 ecstasy tablets a day and had bought in bulk to save money. He said the dealer had given him the cocaine because it had been his birthday.

He claimed to have paid only £60 for 209 ecstasy tablets which, said Judge Heywood, should "start alarm bells ringing" somewhere.

Judge Heywood sentenced Mathias to 52 weeks in jail, suspended for 12 months, and ordered him to carry out 200 hours of unpaid work.

Miss Powell asked for £1,200 in prosecution costs but was awarded only £250 which the judge said was “appropriate with the history of the case”.