Those pesky ATM fees have climbed to a record high, and the pace of increases may soon accelerate.

The average surcharge that ATM operators charge non-customers to withdraw cash rose 2% over the past year to $3.09, the 15th straight year of increases, according to a July survey by Bankrate.com.

The good news is that the average fee charged by the customer’s own bank for using a foreign ATM dipped 2% to $1.63, the second straight annual decline.

All told, the average total cost for an ATM withdrawal still hit a record $4.72, up 3.3% over the past three years and 33% the past decade, the Bankrate survey shows.

“The fees keep going up, but they’re completely avoidable” if customers use their own bank’s ATM or stay within the networks that many smaller banks and credit unions have formed, says Bankrate Chief Financial Analyst Greg McBride. Another option, he says, is to get cash back with a debit card when you make a purchase at a store.

The biggest portion of the tab is the ATM operator’s charge, which non-customers immediately see when they get their money. That surcharge is up 6.5% over the past three years and 39% the past decade.

There are several reasons for the surge, McBride says. Fewer Americans are using cash these days, forcing banks to spread their costs over a smaller customer base. There’s little downside to alienating non-customers. And banks are more likely to hike the fees when low-interest rates crimp their margins – which is the difference between the interest they pay depositors and the rate they charge borrowers for loans.

The Federal Reserve kept its key interest rate near zero for years after the Great Recession ended in 2009 to spur more borrowing. ATM fees jumped sharply during that period, but the increases have moderated the past few years as the Fed raised rates in an improving economy, McBride says.

Free trade?:Charles Schwab eliminates online trading commissions: Fee war escalates, stock tanks

Since July, however, the Fed has lowered rates twice to head off a potential recession and many economists expect two more cuts by early next year.

“Now that interest rates have fallen, banks may be under pressure again,” McBride says. “Do we see a faster pace of increases in the next two years?”

At the same time, he says, banks have more modestly increased the fees they charge their own customers for using another ATM to attract and retain them so they can sell them other services. The share of banks allowing free out-of-network withdrawals hit a record high 32%, up from 25% in 2012.

Sweet beer:Beer meets chocolate in new Yuengling and Hershey's rich, chocolatey porter

Overdraft fees – charged for having insufficient funds in a checking account – increased for the 19th time in 21 years, the survey showed. The average overdraft fee is $33.36, just below the record $33.38 set 2017. Those charges also may rise faster as Fed rate cuts narrow bank profit margins, McBride says.