Like most people, you purposefully count your cash the instant the bank ATM spits it out. You won’t be shortchanged, certainly not by a machine.

But what if the cash you receive is phony? You didn’t think to check for that, and why should you? You expect the money you get from your bank to be the real deal.

Banking security experts say that’s what you should expect and that instances of banks unknowingly dispensing counterfeit money are exceedingly rare, thanks to layers of safeguards to prevent counterfeits from getting into their supply. Less than 0.01% of all U.S. currency in circulation is reported counterfeit, according to the U.S. Federal Reserve, which is responsible for making sure currency at banks is genuine.

The chances of getting counterfeit money from an ATM might be off-the-charts low, but even exceedingly rare things happen. News media periodically report on consumers who find themselves holding a phony bill, which they traced to an ATM.

If you suspect you’ve received counterfeit money from an ATM, the experience can be unnerving. The bogus cash is seized, and the Secret Service gets involved. Plus there’s the added uncertainty: Even if you spot the bill at the ATM, how do you plead your case to a machine? Here are some tips for what to do if you suspect you’ve received counterfeit money from an ATM.

First, the question that’s probably top of mind: Will you get your money back if you’re left holding counterfeit cash that you think came from an ATM? If the bill came from your bank’s ATM, the answer could ride on your relationship with the bank.

Banks typically don’t have a way of knowing if cash came from their branch or ATM, even if you have a receipt, so a claim that it did is handled on a case-by-case basis. Whether your bank will swap out a bogus bill for a genuine one is up to its discretion.

“If you’ve got a longstanding customer who has a variety of different services and products with you, that’s going to give their allegation a lot more credence than someone you don’t have a relationship with,” says Doug Johnson, senior vice president of risk management with the American Bankers Association. Still, Johnson encourages all customers, old or new, to bring up the matter with their bank.

Banks are required to confiscate the counterfeit money and turn it over to the Secret Service, which investigates and takes the counterfeit bills out of circulation.

Last year, the agency seized $58 million overall in counterfeit U.S. currency. While that’s a tiny fraction of the roughly $1.4 trillion in circulation in 2015 — according to the U.S. Federal Reserve — it’s enough for the Secret Service to call counterfeiting a growing threat to the financial system with counterfeiters adopting sophisticated advances in technology.

Typically, you discover you have suspected counterfeit money when you try to use it at a retail store. The cashier spots it with a pen that detects starch in wood-based paper by turning the tested area a deep blue-black color. Those pens aren’t always accurate, by the way; the Secret Service recommends that you look instead for these security features on the notes:

Cash inserted into bank ATM cartridges comes directly from the U.S. Federal Reserve, which has its own counterfeit detection measures, says Shirley Inscoe, a senior analyst at Aite Group, a Boston-based financial industry market research firm.

Inscoe formerly worked at a major bank training tellers how to detect phony bills. She said that because banks have safeguards, bogus money typically is passed at retail businesses, which unknowingly deposit it into their bank accounts. Banks detect the counterfeit, confiscate it, charge the amount to the retailer’s account and call the Secret Service.

Johnson, the American Bankers Association executive, said instances of counterfeit money coming from banks are so rare that banks don’t keep track of how many times it happens. But no safeguards are foolproof. “We’re all human,” Johnson says.

If you think you’ve received counterfeit money from a bank ATM, take the currency back to the financial institution. Inscoe says it helps if you have a receipt from the transaction. If you don’t have one, remember the time and details of the transaction, such as the ATM location.

If you suspect you received counterfeit money from an ATM not belonging to a bank, such as one you might find at a convenience store, you should call police or the Secret Service. If the merchant isn’t helping, your bank can assist even if the machine is not its ATM, Inscoe said. Owners of store ATMs typically stock the machines themselves, so the currency might not be subject to the same safeguards as those found at banks.

While you’re waiting to turn over counterfeit money to authorities, store it separately from genuine cash. Above all, don’t try passing it off somewhere else. It’s illegal to try to pass counterfeit money if you know it’s phony.

The Secret Service won’t cover your loss, and your bank might not either. But check your homeowners or renters insurance policy to see if you’re covered against counterfeit money. Some policies cover up to $500 if you unknowingly receive fake money, and usually there’s no deductible.

Juan Castillo is a staff writer at NerdWallet, a personal finance website. Email: Twitter: @JCastilloNerd.

The article Your ATM Spit Out Counterfeit Money. Now What? originally appeared on NerdWallet.