With Halloween right around the corner, police said several University at Buffalo students were having a special treat of candy-flavored marijuana when they got spooked by a raid Thursday.

Alexander J. Zito was throwing a party for the students at his Delaware Avenue apartment when Buffalo narcotics detectives arrived to discover chocolate-flavored marijuana, hard candy containing marijuana, 640 “Jolly Lolly” marijuana lollipops and 5 pounds of regular marijuana, authorities said.

The students were described as extremely high when the raid occurred at about 4 p.m. in Zito’s sixth-floor apartment on the 600 block of Delaware, where $13,000 in cash was also seized, according to Narcotics Detective Sgt. Timothy Mulhern.

Zito, 26, allegedly arranges to obtain the marijuana on trips to California under the guise that it is for medicinal purposes and then has it shipped here through the U.S. Postal Service. Medical marijuana in California is legal under state law, but that is not the case in New York.

As police searched his apartment, Zito informed them he was a UB graduate seeking to return to the university and earn a master’s degree, detectives said.

“One of the students was so high we thought he was going to pass out,” Mulhern said.

Though Zito claimed to be unemployed for two or three years, he apparently was prospering. Police found records indicating his rent was paid six months in advance and the furniture in his residence was brand new. Business cards, Mulhern said, also were found stating Zito was the proprietor of a medical marijuana shop in San Diego.

An Internet advertisement for Jolly Lolly lollipops by another vendor of medical marijuana described candy versions of pot as a less-than-noticeable way to consume pot.

“These lollipops and lozenges make sweet and discreet medicating easy! Comes in multiple flavors and styles … the equivalent of 2 grams dried bud.”

But different forms of marijuana were not the only thing Zito had, police said. Hashish and crack cocaine also were found at his residence. He was charged with felony possession of marijuana and cocaine.

Conducting the investigation into Zito and carrying out the search-warrant authorized raid were Detectives Carmen Clark, Mark Locicero, Deborah Mulhern, Kevin Biggs, Anthony LaPiana and Leo McGrath, along with assistance from K-9 Officer Dennis Kessler and his dog “Duke.”