A university student went into a brief coma after eating a birthday cake baked with marijuana, and 10 others became seriously ill, officials in Spain said.
Javier Chivite, a spokesman for Madrid's emergency services, said two youths were taken to hospital early on Sunday.
He said one of them was comatose and not responding to stimulus when admitted, but later recovered.
Jose Dominguez de Posada, dean of Madrid's Alfonso X University, said the students were all male and aged between 18 and 22 and the most affected was studying veterinary sciences.
Mr Chivite said the others were found to be suffering from euphoria, red eyes and irregular heartbeat.
Mr Dominguez de Posada said the university campus houses about 12,000 students.