Two people have died from suspected drug overdoses after attending Sydney's annual Defqon.1 festival, sparking the New South Wales premier to state she never wants to see it held in the state again.

A 23-year-old man from western Sydney and a 21-year-old woman from Victoria died at Nepean Hospital after collapsing at the Penrith hardstyle event around 9pm, according to police.

Three more festival-goers remain in a critical condition in hospital.

Premier Gladys Berejiklian said: "I never want to see this event held in Sydney or New South Wales ever again — we will do everything we can to shut this down".

She denied cancelling the event would force it and others underground, and said pill testing was "not a solution".

"Anyone who advocates pill testing is giving the green light to drugs. There is no such thing as a safe drug and unfortunately when young people think there is, it has tragic consequences," she said.

Harm minimisation group Sniff Off said it was "disgusting" Ms Berejiklian was "using the tragic loss of these two young lives to push her absurd 'just don't do drugs' message, when it is the NSW government's extreme overpolicing measures that allowed deaths like this to occur in the first place".

"Installing police with drug dogs at festivals only causes people to panic-swallow all their drugs at once, so it's no wonder that people overdose," it posted.

Unharm posted: "For years Defqon.1 has had a ‘zero tolerance’ policy on drugs. They tell patrons that anyone found with drugs will be handed over to police. Since 2013, the Defqon.1 death toll stands at four, with two more people dying after this year’s event. This is what ‘zero tolerance’ has achieved. It’s way past time to take a different approach. It’s time for drug safety testing now."

Greens MP David Shoebridge wrote: "Tragic news that two people lost their lives last night at Defqon.1. We see the ongoing failure of aggressive police and drug dog presence at festivals and nothing changes. Pill testing and amnesty bins now."

Scott Carbines is Mixmag's Australian Digital Content Editor, follow him on Twitter