Officials on Friday warned of the dangers of recreational Xanax use after incidents in Pinole and San Francisco involving both real and counterfeit pills.

Seven students used the prescription drug Xanax on Thursday at Pinole Valley High School, according to school district officials. Five of the seven were hospitalized and all are now facing disciplinary action.

Marcus Walton, spokesman for the West Contra Costa Unified School District, said it was reported around noon Thursday that several students were acting in a concerning manner at the school.

Walton said officers on campus found the seven students, ranging from grades 10 to 12, were intoxicated after taking the prescription drug, which is used to treat anxiety. Five were taken to the hospital and two were released to their parents.

Only a day later, San Francisco Department of Public Health officials warned the public to avoid buying prescription drugs on the street after counterfeit Xanax pills were linked to a death and numerous severe opioid drug overdoses last week.

The officials Friday warned that these pills, marked and sold as the anti-anxiety drug Xanax, were found to contain fentanyl, "an extremely potent, short-acting opioid that can cause overdose and death."

Fentanyl and other compounds in these pills were connected to the hospitalization of three adults in San Francisco between Oct. 15 and 17.

The individuals suffered complications of opioid overdose including sedation, weakness in their extremities, muscle breakdown and fluid in their lungs.

Two of the three individuals became critically ill, public health officials said. In a separate incident involving the same pill, a 34-year-old San Francisco woman died from an overdose.

As for the Pinole students, all of them are recovering and are currently expected to return to good health, Walton said.

Walton said school administrators are working with Pinole police to investigate how the teens came to possess the drugs.

"(And) all the students will face appropriate consequences for their actions, and most importantly will be referred to our health center for follow up when they return," an announcement today on the school's website said.

School officials implored parents of students to speak about drugs and potential dangers in using them.

School officials also expressed that they were grateful that the health consequences "look like they will be mild."