This invention relates to a device that uses microneedles to create pores in the skin of a subject and delivers the drug transdermally by inserting it into the pore as a solid or semi-solid mass alongside each needle. The device is sufficiently flexible to allow relative movement of the needle and the drug mass apart from one another. Preferably a chamber holding the drug mass comprises a relatively rigid wall to ensure that the drug remains aligned close to the needle, while an adjacent chamber holding the needle comprises a relatively flexible wall to allow lateral movement of the needle as the drug is inserted alongside it.