Identity protection isn't just for the living. Every year, identity thieves steal the social security numbers of 2.5 million deceased Americans according to a report by ID Analytics, which specializes in credit and fraud risk solutions.

It's called “ghosting,” and if someone starts impersonating your loved one after they’ve traveled to the great beyond, you could end up with a pile of bills to explain.

In about a third of all such identity thefts, the scam artist will deliberately use the social security number of a person who has died, according to the report. The rest of the time, they make up a “fake” social security number that, coincidentally, belonged to a dead person.

These scammers typically use that number to open accounts and make credit card purchases in the deceased's name, which you might not learn about until bill collectors start showing up to demand their money, according to the California Department of Justice.

Related: How to Protect Your Child from Identity Theft

A race with the criminal underworld

When a loved one dies, you're essentially in a race to notify all interested parties of their passing before a bad guy starts pretending they're still alive. Here’s your game plan.

Watch what you write in the obituary. If you post an obit, don't include the person’s birth date, address, mother's maiden name or other personal information that could be hijacked by scam artists, the Internal Revenue Service recommends.

Notify the Social Security Administration. Scam artists often need someone's social security number to open credit accounts, and dead people don't complain. Normally, your funeral director will notify the agency, but to be on the safe side you can also call them at (800) 772-1213 or TTY (800) 325-0778.

Notify all three credit reporting bureaus. Contact the three major bureaus — Experian, Equifax and Transunion — and request that a “deceased alert” be placed on the person’s credit report. Businesses often request a credit report before extending credit, so it's important the report indicate the person is no longer alive.

Related: Data Hacking Victim? Why and How to Monitor Your Credit Reports

Get copies of the death certificate. Many of the organizations and agencies will need a copy of the death certificate before they can act. Ask the county to send you at least twelve certified copies because not everyone will accept a photocopy.

File the person’s taxes asap. You (or someone) will have to file your loved one’s tax returns for the year in which they died. It's vital that you file early so thieves can't file their own forged tax returns and obtain fraudulent refunds.

If you're an estate executor, trustee or other fiduciary for the deceased, complete Form 56 and mail it to the IRS. It notifies the agency that you're the responsible party and how to contact you. This is especially important if you live at a different address from the deceased.

Take it a step further. If you have the time and are willing to put in the effort, you can dot your i's and cross your t's by alerting other agencies and organizations, including:

  • Government agencies, such as Motor Vehicles, Veterans Administration, immigration agencies and public libraries
  • Private organizations, such as professional groups and fitness clubs
  • Financial institutions, such as insurance companies and banks

Have documents handy that prove that you're the spouse or estate executor, in case someone asks you to demonstrate that you're legally entitled to represent the deceased's estate. If there is no spouse or executor, explain this to the organization and cooperate with them until they accept you as a legal representative. After all, for all they know you could be an identity thief yourself.

If an scam artist succeeds in opening accounts or buying merchandise in the deceased's name, respond just as you would if they had done so in your name by informing merchants, creditors and credit bureaus in writing. The California Department of Justice has sample letters you can reference when crafting your own letters.

Related: Three Popular Scams Against Seniors to Beware

David Arv Bragi is a freelance journalist and marketing consultant. He has been writing about health and safety issues since the 1990s and currently lives in Portland, Oregon.