(Bloomberg) -- U.S. consumer borrowing surged in February by the most since late 2017 as a broader re-opening of the economy from pandemic restrictions helped spark an increase in credit-card balances.

Total credit jumped $27.6 billion from the prior month, the largest gain since November 2017, after a revised $94 million January gain, Federal Reserve figures showed Wednesday. On an annualized basis, borrowing rose 7.9% in February.

The gain in February credit exceeded all estimates in a Bloomberg survey of economists. Revolving credit climbed $8.1 billion, the most since December 2019 and only the second advance in a year. Non-revolving credit, which includes auto and school loans, rose $19.5 billion, the biggest increase since June.

Lending by the federal government, which is mainly for student loans, increased $5.7 billion before seasonal adjustment.

The overall improvement in borrowing highlights a consumer that is growing more confident as the economy accelerates, job growth picks up and more states lift burdensome restrictions.

(Updates with chart, additional details)

©2021 Bloomberg L.P.