context: Occipital neuralgia is a condition in which the nerves that run from the top of the spinal cord up through the scalp, called the occipital nerves, are inflamed or injured. You might feel pain in the back of your head or the base of your skull. People can confuse it with a migraine or other types of headache, because the symptoms can be similar. But treatments for those conditions are very different, so it's important to see your doctor to get the right diagnosis. Occipital neuralgia can cause intense pain that feels like a sharp, jabbing, electric shock in the back of the head and neck. Other symptoms include: Aching, burning, and throbbing pain that typically starts at the base of the head and goes to the scalp Pain on one or both sides of the head Pain behind the eye Sensitivity to light Tender scalp Pain when you move your neck Occipital neuralgia happens when there's pressure or irritation to your occipital nerves, maybe because of an injury, tight muscles that entrap the nerves, or inflammation. Many times, doctors can't find a cause for it. Some medical conditions are linked to it, including: Trauma to the back of the head Neck tension or tight neck muscles Osteoarthritis Tumors in the neck Cervical disc disease Infection Gout Diabetes Blood vessel inflammation Your doctor will ask you questions about your medical history and about any injuries you've had. She'll do a physical exam, too. She'll press firmly around the back of your head to see if she can reproduce your pain. She may also give you a shot to numb the nerve, called a nerve block, to see if it gives you relief. If it works, occipital neuralgia is likely the cause of the pain. You might also have blood tests or an MRI scan if your doctor thinks your case isn't typical. You have to get the right diagnosis to get the right treatment. For example, if you have occipital neuralgia and you get a prescription for migraine medication, you may not get relief. The first thing you'll want to do is to relieve your pain. You can try to: Apply heat to your neck. Rest in a quiet room. Massage tight and painful neck muscles. Take over-the-counter anti-inflammatory drugs, like naproxen or ibuprofen. If those don't help, your doctor may prescribe medications for you, including: Prescription muscle relaxants Antiseizure drugs, such as carbamazepine ( Tegretol) and gabapentin ( Neurontin) Antidepressants Nerve blocks and steroid shots. The nerve block that your doctor might do to diagnose your condition can be a short-term treatment, too. It may take two to three shots over several weeks to get control of your pain. It's not uncommon for the problem to return at some point and to need another series of injections. An operation is rare, but it might be an option if your pain doesn't get better with other treatments or comes back. Surgery may include: Microvascular decompression. Your doctor may be able to relieve pain by finding and adjusting blood vessels that may be compressing your nerve. Occipital nerve stimulation. Your doctor uses a device called a neurostimulator to deliver electrical pulses to your occipital nerves. They can help block pain messages to the brain. Occipital neuralgia is not a life-threatening condition. Most people get good pain relief by resting and taking medication. But if you still hurt, tell your doctor. She'll want to see if there's another problem that's causing your pain.