Shoppers shrugged off the turmoil on Wall Street and hit the mall - and online shopping sites- with a vengeance, driving 2018 holiday sales to their highest levels in more than half a decade.

Retail sales hit $850 billion this year, rising 5.1% over last year during the traditional holiday shopping season from Thanksgiving through Christmas, Mastercard (MA) - Get Report reports.

Online shopping posted some of the biggest gains in the retail sector, jumping more than 19% over last year, the credit card company noted. The upbeat sales numbers come amid rising anxiety in the markets about the potential for slowing growth or even a recession in 2019.

Mastercard's stock price was up 2.1% in late morning trading, to $178.44.

"By combining the right inventory with the right mix of online versus in-store, many retailers were able to give consumers what they wanted via the right shopping channels," said Steve Sadove, senior advisor for Mastercard and former CEO and Chairman of Saks Incorporated.

Overall, apparel and home improvement were the biggest winners in terms of holiday sales, rising 7.9% and 9%, respectively, Mastercard said. Sales of furniture and home furnishings grew by a more modest 2.3%.

Department stores saw sales fall 1.3 percent, which comes on the heels of two years of growth below 2 percent amid a surge of store closings. The decline was offset somewhat by a 10.2% spike in online sales by department stores.

Electronics and appliance sales fell .7%, according to Mastercard.

Amazon (AMZN) - Get Report reported what it said what it said were record-breaking sales as well, though the company did not offer specific numbers.

The online retailing giant claimed tens of millions of new Prime accounts, a mix of free promotional subscriptions and paid, with more than one billion items shipped.

Amazon also reported selling "millions more" Amazon devices this holiday season, with best sellers including "all-new Echo Dot, Fire TV Stick 4K with all-new Alexa Voice Remote, and Echo."