Allan said the pill testing service would operate from 1pm to 7pm on each day of the festival and could check whether pills, capsules, powders and liquids contain potentially deadly substances.

A consortium — led by the Youth Support and Advocacy Service, Harm Reduction Victoria, and The Loop Australia — will run the service, supported by Melbourne Health and The University of Melbourne.

The machines used would be able to deliver a result within minutes and can identify "almost anything" — but they cannot give an indication of purity and, in some cases, may not be able to detect trace amounts of harmful chemicals, [The Loop Australia CEO] Cameron said.

Beyond The Valley will be one of 10 festivals to offer the services.

The others are yet to be named, but Victoria's Mental Health Minister Ingrid Stitt said pill testing would be offered at five festivals this summer, and a further five in 2025-26.