A University of Virginia sophomore who died after collapsing at a District nightclub over the weekend took a purified form of ecstasy called Molly, a drug that police in Boston and New York have linked to three deaths since last week, according to law enforcement officials familiar with the case.

Authorities in New England said they are investigating whether a single batch of the synthetic drug caused the deaths and several additional overdoses by college students attending clubs or outdoor concerts marking the end of summer.

Three D.C. police officials said they are aware of the casualties in the Northeast and think that the death of Mary “Shelley” Goldsmith, 19, an honors student from Abingdon, Va., could be linked to the same drug or a similar one. Goldsmith had been at a rave concert at a club called Echo Stage in Ivy City, just off New York Avenue in Northeast Washington, authorities said.

The police officials, who spoke on the condition of anonymity because the investigation is ongoing, said Goldsmith’s friends told detectives that she had taken Molly at the club early Saturday. D.C. police spokesman Gwendolyn Crump said only that toxicology results would determine the official cause of Goldsmith’s death.

Robert G. Goldsmith said his daughter’s friends told him that she had taken the drug. He said family members discussed whether to make the information public and concluded that they had to warn others.

“Shelley deserves a legacy of being someone who cared for people, someone who achieved, someone who contributed, and not a druggie who died,” he said. “That’s not who she was. But if her death can open someone’s eyes, then we need to talk about it.”

Law enforcement officials said Molly has long been the street name for the powder form of MDMA, the main ingredient in ecstasy, a popular party drug that can produce a euphoric, energetic and confident high. But in recent years, officials said, Molly has become a generic term for the hundreds of designer drugs made in labs and marketed online by overseas chemists.

Police in the District, New York and Boston say they are awaiting autopsy results to determine whether the same batch of drugs is responsible for all of the deaths and to learn what was in the mixture.

“We’re cautioning people not to take any synthetic drugs that they don’t know anything about,” said Cheryl Fiandaca, a spokeswoman for the Boston police. She also noted the danger of mixing the drugs with alcohol.

Authorities in Boston and elsewhere would not say whether any of the drug has been found and seized for testing. But concern is rising in the Northeast after the incidents in Boston and New York and at least a dozen overdoses reported during the summer in the Boston suburb of Quincy, all at one nightclub.

In the District, police officials said that the Goldsmith case is the first they have encountered involving a lethal form of Molly.

Boston police said one person died — a 19-year-old female student at Plymouth State University in New Hampshire — and two others overdosed at the House of Blues on Aug. 28. On Saturday, three more people overdosed at a concert on the Boston waterfront.

In New York City, two people died — a young man who had attended Syracuse University and a 20-year-old student at the University of New Hampshire — and four people overdosed at the Electric Zoo music festival, according to news accounts.

Molly is a well-known term in pop culture, including music lyrics. In a song with Kanye West, for example, Rihanna sings, “palms rise to the universe, as we moonshine and molly.” And as Miley Cyrus twerked, licked and danced during the Video Music Awards last month, one song contained the line: “We like to party, dancing with molly.”

Joseph Moses, a special agent with the U.S. Drug Enforcement Administration, said the market is saturated with synthetic drugs, many coming from China, that can be bought online. “Molly for years has been the generally accepted street name for ecstasy,” Moses said. “In the past, if you ordered up Molly, you got ecstasy. That’s no longer true.”

DEA spokesman Rusty Payne said there have been spikes of overdose deaths across the country linked to these kinds of drugs. “A bad guy can put whatever they want on the packaging,” Payne said. “Half the time, they’re throwing ‘Molly’ on the label and they don’t know what the stuff is.”

D.C. police officials said they think Goldsmith had come to the District on a bus with friends from school. Police said she fell ill at the club and collapsed about 1:40 a.m. She died at Providence Hospital early Sunday.

Managers at the club declined to comment but issued a statement saying they are “saddened to hear about Mary Shelley Goldsmith’s death.” They promised to “cooperate with the appropriate authorities.”

Goldsmith had already filled her résuméwith volunteer work and accolades. She hoped to pursue a career in law and public service, according to an obituary posted online. She graduated from Abingdon High School with honors in 2012 and was accepted into U-Va. and named a Jefferson Scholar, the university’s highest merit scholarship program.

She was also a member of the Alpha Phi sorority and worked at a restaurant near the campus, Boylan Heights. Goldsmith’s obituary points out that while she loved to play tennis, hike and sail, “she could also drive a tractor and shoot quite proficiently.”

“Her love of life was contagious,” the obituary says. “She volunteered at the food bank, worked for Democratic candidates, decorated cupcakes with her friends, all with confidence, enthusiasm, organization and a light heart.”

Her father, the president of a nonprofit organization that helps people find jobs and housing, said that if his daughter can overdose, “anyone can.”

Robert Goldsmith said he had never known his daughter to take drugs. “This might have been the first time she did it,” he said. “It might not have been the first time. I hate to admit it, but I’ve never heard of this drug before. It seems to be the drug of choice.”