Commuters pass the entrance to the West Lake Water Park in Hanoi where seven partygoers died from apparent drug use

Seven Vietnamese have died and five are in a coma after taking drugs at an electronic dance music festival in Hanoi, officials said Monday, as authorities scrambled to trace the substance.

The Sunday night disaster, believed to be the deadliest drug-related incident in the country, shocked the communist nation's conservative capital. Synthetic drug use is on the rise but remains largely underground among a relatively niche group of hard-partying youth.

The victims, all Vietnamese, tested positive for an unspecified drug, prompting officials to ban all electronic dance music (EDM) festivals in the capital.

"Police investigators are trying to figure out what type of drug that was," deputy director of Hanoi police Nguyen Van Vien told reporters Monday.

Officials said the dead were all in their 20s, while the five people in a coma in intensive care are aged between 18 and 30.

If the deaths are confirmed as drug-related it could be one of the worst cases anywhere in recent momory of mass narcotics-related deaths at a music festival.

Sunday night's "Trip To The Moon" festival was hosted by Vietnam Electronic Weekend in Hanoi's upscale West Lake, a neighbourhood popular among expats, teachers and youth for its nightlife.

Thousands attended the event which sprawled across three stages at a water park and included EDM big hitters Yellow Claw and Headhunterz on the line-up, according to the online flyer.

One festivalgoer said she saw several people collapse in the crowd and about four people shuttled out on stretchers.

"I thought maybe they were just exhausted but when I saw more people (being carried out) I was shocked... there were so many ambulances outside I was freaking out," she told AFP, declining to be named.

Another who attended the festival said she saw many people she suspected to be high standing around dazed for most of the night.

"They didn't dance much, just swayed a bit and they didn't like the lights shining directly at them," she told AFP, adding that security did not spend much time checking people at the entrance.

Organisers did not respond to AFP's calls on Monday.

- Synthetics on the rise -

Investigators are trying to confirm who brought the drugs into the venue and said all events of its kind would be banned in the capital pending the probe.

"The incident yesterday... was very painful. It was a great loss," said Tran Xuan Ha, deputy head of the Hanoi government's propaganda department.

Tickets cost between $21 and $135 in a country which has joined Asia's multi-million-dollar fixation on EDM.

Most ravers are found in the cosmopolitan and more free-wheeling southern hub of Ho Chi Minh City.

But the EDM party scene has gained popularity in the capital as has drug use among young people, in a city where most bars and clubs are supposed to close at midnight in line with the official curfew.

It was the third Vietnam Electronic Weekend festival held in the country and was slated to be the biggest yet, according to state media.

Shocked Hanoians expressed grief online at the deaths.

"A warning message for those young ones who have been so irresponsible for their own (lives)," reader Nam Huynh wrote on VNExpress.

There are some 220,000 registered drug users in Vietnam, according to official figures.

In the past most users were hooked on opium and heroin, though strong synthetics such as methamphetamine and ecstasy are becoming increasingly popular.

Use of synthetic drugs rose seven percent between 2001 and 2016.

The synthetic substances largely come into Vietnam from the notorious "Golden Triangle" drug producing zone -- comprised of lawless parts of Laos, Myanmar and Thailand -- though some high-profile busts in recent years in Vietnam have uncovered domestic labs.

"Drug users always tended to want to use something new, hoping for a new taste. The common drugs in Vietnam now are amphetamines," Oanh Khuat, executive director of the Center for Supporting Community Development Initiatives, told AFP.

"I was shocked receiving the news, but not surprised because young people have been using drugs at these event elsewhere in the world and in Vietnam as well."