A 28-year-old man from Floriana pleaded guilty to trafficking heroin and cocaine.
Clive Agius also pleaded guilty to being in possession of cannabis and relapsing.
Police Inspector Herman Mula told the court that the man trafficked drugs to sustain his own habit.
Lawyer Gianluca Caruana Curran asked for his client, who he said was a heavy user, to be kept at the Forensic Unit in Mount Carmel Hospital.
Sentencing is on Thursday.