"In North Wales over Christmas and New Year we had two cases of unknown drugs and this isn’t going to going to be stopped, new substances are emerging all the time.

"The key issues are public safety and education and on that basis I support what Wedinos is doing.”

A Welsh Government spokesman said: “We totally reject these claims. We are taking action to help individuals and society deal with the problems of substance misuse. Wedinos can provide essential intelligence and can help save lives.

“It contributes to the wider UK and European Early Warning Systems in place to identify and monitor changing trends in drug use.”

Mr Millar, Conservative shadow health minister said: “This website suggests that Labour in Wales has given up the fight against drugs.

“At a time when more patients than ever are waiting for NHS treatment and Welsh cancer patients are being denied modern medicines, it is astounding that anybody, including drug dealers, is being given access to a free analytical service to test the quality of their substances.

“Many Welsh taxpayers will be angry that, at a time when the Welsh NHS is still struggling to cope with the legacy of record-breaking cuts imposed by the Welsh Labour Government, Ministers still seem to have the cash to throw resources at novelty programmes like Wedinos.

“This free service is not just testing recreational highs, but illegal and dangerous drugs including heroin, cocaine and crack and gives advice on snorting and injecting substances.

“In providing funding for this project, Ministers are confusing the message that these illegal substances are harmful and potentially promoting their use.

“The Welsh Government should be trying to tackle drug dependency and not allowing drug dealers to benchmark the quality of the substances they pedal to vulnerable people in deprived communities of Wales.

“While the service may have been set up with the best of intentions, it is obviously open to abuse by dangerous criminals peddling harmful substances in order to fund other crime.

“Welsh Labour Ministers should explain how this programme provides any benefit to hardworking taxpayers or shut it down and reinvest the savings in frontline services.”

Mr Millar tabled questions to health minister Mark Drakeford about the service, and was told £102,000 was awarded in respect of the Wedinos project in 2013-14.

Confirmation of funding for the 2014-15 financial year would be made shortly.

Mr Drakeford said he would ensure a summary of the Wedinos project business case was published in the members’ library.

The Welsh Government said it is taking action to tackle new psychoactive substances (NPS) - so-called legal highs - and prescription drugs.

These included supporting a national training programme to ensure professionals who come into contact with individuals who may be misusing NPS have a sound knowledge base and are able to deal effectively with individuals who present to services.

It also included funding the Welsh Emerging Drugs and Identification of Novel Substances (WEDINOS) project which provides a framework for the collection and testing of sample NPS.

The findings, along with the identification of the chemical structure of the samples, were then ‘disseminated to provide evidence based harm reduction advice for those using or considering using NPS’.

Public Health Wales said the Wedinos site was established in response to demand from the emergency services, which are increasingly confronted with patients suffering the effects of taking substances which they cannot identify.

Josie Smith of Public Health Wales told BBC Radio 4’s Today programme: “Essentially, the Wedinos project was established as a consequence of a call from clinicians within emergency departments, ambulance and other health services, along with the criminal justice service, where they were being presented with individuals who had taken substances but were unaware of what they were.

“The clinician would be unaware of what the substance was. They didn’t know how to treat.

“Over the last few years, we’ve seen a real sea-change in the drugs market. We refer to the term ’new psychoactive substances’ because the term ’legal highs’ can denote a degree of safety, and actually we are finding that there are a number of adverse effects that people are experiencing.”

Ms Smith said 52% of the samples sent to Wedinos were bought as legal highs, but 27% of those actually contained illegal substances. Evidence from across the UK showed that, even within a single batch of substances brought into the country from China or India, the actual chemical make-up can vary widely.