You may have been called “a pain in the neck” or bothered by someone you consider to be a pain in the neck, but worse than that can be having real pain in the neck.

The most common causes of neck pain are muscle strain or tension. These often result from bending over a desk for hours, sleeping in an uncomfortable position, or twisting and turning the neck abruptly while exercising. Poor posture or placing a computer monitor too high or too low can increase the chances you will suffer neck pain.

Other causes of neck pain include a herniated disc, arthritis, fibromyalgia (pain syndrome throughout the entire body), and less commonly, meningitis (inflammation of the membranes enveloping the brain and spinal cord). Accidents and falls can cause severe neck injuries, including whiplash, fractures of the vertebrae (bones of the neck and spine), and even paralysis.

What to do for minor neck pain

For minor neck pain from common causes, the National Institutes of Health recommends the following:

Take acetaminophen or ibuprofen.

Apply heat or ice to the painful area. One good method is to use ice intermittently during the first 48 to 72 hours and follow with heat from a heating pad, hot showers, or hot compresses. Do not sleep with a heating pad or get in such a relaxed position that you are in danger of falling asleep with a heating pad.

Perform slow range-of-motion exercises to gently stretch your neck muscles. Move your neck up and down, side to side, and from ear to ear.

Ask a partner to gently massage the sore or painful areas.

Try sleeping on a firm mattress without a pillow or with a special neck pillow.

When you need to call your doctor

Not all neck pain succumbs to self-care. The following circumstances should prompt a visit to your doctor.

After one week, self-care has not helped ease your neck pain.

You have numbness, tingling, or weakness, in your arm or hand.

You have swollen glands or a lump in your neck.

Your pain does not respond to standard doses of over-the-counter pain medication.

You should get emergency care by going to a hospital or calling 911 if:

Your neck pain was caused by a fall, blow, or injury and you cannot move your arm or hand.

You have a fever and headache and your neck is so stiff that you cannot touch your chin to your chest. This could be an indication of meningitis.

Finding the source of the pain and relieving it

Your doctor will perform a physical examination and ask detailed questions about when the neck pain first developed, where it seems to be located, what makes it worse, and possible accompanying symptoms, such as numbness, tingling, or weakness in your arm or hand. Diagnostic tests such as X-rays, CT scans, and blood work may be ordered.

If the diagnosis is pain due to muscle spasm or pinched nerve, your doctor may prescribe a muscle relaxant and possibly a more powerful pain reliever. If there is nerve damage, you may be asked to wear a neck collar and be referred to a neurologist, a physician specializing in the diagnosis and treatment of diseases of the nervous system. If meningitis is suspected, you will be sent to an emergency department for further tests, antibiotics, and admission to the hospital. If a thyroid condition is suspected, additional follow-up tests will be needed.

Some methods to help prevent neck pain

The following techniques are recommended by the National Institutes of Health and offered here by the Medical Society of the State of New York.

Get regular exercise and try relaxation techniques to prevent unwanted stress and tension to the neck muscles.

Learn how to properly stretch your neck and upper body and do so every day, especially before and after exercise.

If exercise tends to cause neck pain, apply ice to your neck after physical activity.

Practice good posture, especially if you sit at a desk all day. Keep your back well supported and adjust your computer monitor to eye level. Stretch your neck every hour or so.

When working from printed documents, use a documents holder and position it at eye level.

If phone work is a major part of your job, use a telephone headset.

When driving, use seat belts to prevent injuries.

Wear a helmet when riding a bike, scooter, or skateboard.

Sleep well. Make sure your pillow properly and comfortably supports your head and neck and your mattress is firm enough.