Midazolam, marketed under the trade name Versed, among others, is a benzodiazepine medication used for anesthesia, procedural sedation, trouble sleeping, and severe agitation. It works by inducing sleepiness, decreasing anxiety, and causing a loss of ability to create new memories. It is also useful for the treatment of seizures. Midazolam can be given by mouth, intravenously, or injection into a muscle, by spraying into the nose, or through the cheek. When given intravenously, it typically begins working within five minutes; when injected into a muscle, it can take fifteen minutes to begin working. Effects last for between one and six hours.