Credit card company American Express said Tuesday that its fourth-quarter profits rose 20% from a year earlier, as eager consumers spent record levels of money during the holiday season on the company’s namesake cards.

AmEx posted a profit of $1.72 billion, or $2.18 a share, up from $1.44 billion, or $1.76 a share, a year earlier. The results were far better than what analysts were looking for, who on average forecast earnings per share of $1.86.

The jump in AmEx’s earnings came entirely from record cardmember spending in the last three months of the year. AmEx customers spent $368.1 billion on their cards in the quarter, compared with $285.9 billion spent on cards in 2020.

That comes to roughly $6,351 per cardmember in the quarter, compared with $4,983 in spending a year earlier.

AmEx was hit particularly hard in the pandemic when its customers were unable to spend on dining, travel and shopping. That appears to be mostly in the rearview mirror. The company saw cardmember spending rise above pre-pandemic levels in the third quarter 2021, and that growth continued into the fourth quarter.

While consumers are spending on their cards, large corporations and businesses are not. The behavioral changes in companies in the pandemic — less business travel, less spending on events — has caused corporate spending to remain down two-thirds from where it was in 2019, the company said. While historically corporate cards were a big part of AmEx’s business, they have increasingly become a minor part of the company’s overall financials.

Like other financial companies, AmEx saw noticeably higher expenses this quarter. Total expenses were up 29%, driven by the company paying out more rewards to its customers but also because of higher compensation expenses for its employees.

The company expects that the easing of the pandemic and the return to travel will boost its revenues in 2022 in a range of 18% to 20%. The company also expects full-year earnings this year between $9.25 and $9.65 a share.

AmEx shares rose 3% in premarket trading.