Last year’s tumble for the stock market wasn’t enough to scare workers from putting money into their 401(k). Instead, many ended up saving more for retirement.

Even after a nearly 20% plunge for the S&P 500 rattled nerves at the close of 2018, workers upped their contributions into 401(k) accounts in the ensuing months. The average worker set aside a record $2,370 during the first quarter, up 15% from a year earlier, according to Fidelity Investments. Not only that, employers increased their own contributions to a record average of $1,780.

“I’ve been in this industry for almost 20 years, and we have been consistently saying that if you have access to a 401(k) or a 403(b), you should take a long-term view,” said Katie Taylor, vice president of thought leadership at Fidelity Investments. “It’s really encouraging that people are doing that now. That we have savings rates going up, employers adding more, it’s all great news.”

Altogether, workers saved an average of 13.5% of their pay during the first three months of 2019. That’s the closest they’ve ever come to Fidelity’s recommendation of setting aside 15% for retirement, including any employer match.

Many factors were likely behind the increase, Taylor said. Some workers may have reassessed their savings after filing their tax returns. Others may have unwittingly raised their contributions, because employers sometimes set plans to automatically increase savings rates unless workers opt out of it.

It didn’t hurt that stock prices were storming higher early this year, as worries about a possible recession receded, and the S&P 500 had its best first quarter since “Titanic” was pulling in moviegoers in 1998.

Those gains, plus workers’ additional contributions, meant the average 401(k) account balance stood at $103,700 at the end of March, according to Fidelity. That’s up from $95,600 at the start of the year and $102,900 a year ago.

Balances for individual retirement accounts and 403(b) accounts had similar gains, up to averages of $107,100 and $85,800, respectively.

Retirement experts have long asked workers to stay the course when it comes to their savings. The stock market tends to have steep drops of 20% or more every six or seven years, and temptation can be high in such moments to sell out of stocks to protect whatever’s left in the nest egg.

But the stock market has — eventually — gone on to recover all its losses after every one of its past downturns. Following the last severe drop, of 56.7% from 2007 into 2009, it took roughly six and a half years for the S&P 500 to get back to its record level.

More savers are now using a special type of mutual fund that can help with the temptation to sell out of stocks. Target-date retirement funds take care of the investment decisions for savers, including how much of a nest egg to put into stocks and how much to put into bonds. More than half of all savers at Fidelity now have all of their 401(k) account in a target date fund. That rate of 52% is up sharply from 16% a decade earlier, when the stock market finally hit bottom following the 2008 financial crisis.

Workers who have access to a 401(k) plan often have higher incomes than other Americans, which is a factor in their increasing balances. But Taylor said she’s seeing improvements for savers along the income scale.

“A lot of people think you have to make a lot of money to save a lot of money,” she said, “but many people who make less than $100,000 are doing very well saving 10% to 15% for retirement.”

© The Associated Press. All rights reserved.