A craniotomy is a surgical operation in which a bone flap is temporarily removed from the skull to access the brain. Craniotomies are often a critical operation performed on patients suffering from brain lesions or traumatic brain injury (TBI), and can also allow doctors to surgically implant deep brain stimulators for the treatment of Parkinson's disease, epilepsy and cerebellar tremor. The procedure is also widely used in neuroscience for extracellular recording, brain imaging, and for neurological manipulations such as electrical stimulation and chemical titration.
Craniotomy is distinguished from craniectomy (in which the skull flap is not immediately replaced, allowing the brain to swell, thus reducing intracranial pressure) and from trepanation, the creation of a burr hole through the cranium in to the dura mater.
Human craniotomy is usually performed under general anesthesia but can be also done with the patient awake using a local anaesthetic; the procedure typically does not involve significant discomfort for the patient. In general, a craniotomy will be preceded by an MRI scan which provides a picture of the brain that the surgeon uses to plan the precise location for bone removal and the appropriate angle of access to the relevant brain areas. The amount of skull that needs to be removed depends to a large extent on the type of surgery being performed. The bone flap is then replaced using titanium plates and screws or another form of fixation (wire, suture, ...etc.).
Bacterial meningitis usually occurs in about 0.8 to 1.5% of individuals undergoing craniotomy. Postcraniotomy pain is frequent and moderate to severe in nature. This pain has been controlled through the use of: scalp infiltrations, nerve scalp blocks, parecoxib, and morphine - morphine being the most effective in providing analgesia.
It is also common to give patients seven days of anti-seizure medications post operatively. Traditionally this has been Phenytoin, but now is increasingly Levetiracetam as it has a lower risk of drug-drug interactions. 
- van de Beek D, Drake JM, Tunkel AR (January 2010). "Nosocomial Bacterial Meningitis". New England Journal of Medicine 362 (2): 146–154. doi:10.1056/NEJMra0804573. PMID 20071704.
- Hansen, Morten S; Brennum, Jannick; Moltke, Finn B.; Dahl, Jørgen B. (December 2011). "Pain treatment after craniotomy: where is the (procedure-specific) evidence? A qualitative systematic review". European Journal of Anaesthesiology 28 (12): 821–829. doi:10.1097/EJA.0b013e32834a0255.
- Szaflarski, J. P; K. S Sangha, C. J Lindsell, L. A Shutter (2010). "Prospective, randomized, single-blinded comparative trial of intravenous levetiracetam versus phenytoin for seizure prophylaxis". Neurocritical care 12 (2): 165–172.
- Temkin, N. R; S. S Dikmen, A. J Wilensky, J. Keihm, S. Chabal, H. R Winn (1990). "A randomized, double-blind study of phenytoin for the prevention of post-traumatic seizures". New England Journal of Medicine 323 (8): 497–502.