Americans borrowed more money in June than during any other month in nearly four years, relying on credit cards and loans to help get through a difficult economic stretch.

The Federal Reserve said Friday that consumers increased their borrowing by $15.5 billion in June. That's the largest one-month gain since August 2007. And it is three times the amount that consumers borrowed in May.

The category that measures credit card use increased by $5.2 billion — the most for a single month since March 2008 and only the third gain since the financial crisis. A category that includes auto loans rose by $10.3 billion, the most since February.

Total consumer borrowing rose to a seasonally adjusted annual level of $2.45 trillion. That was 2.1 percent higher than the nearly four-year low of $2.39 trillion hit in September.

Borrowing is usually a sign of confidence in the economy. Consumers tend to take on more debt when they feel wealthier. But an increase in credit card debt could also signal that people are falling on harder times.

Americans have been struggling this year with high unemployment, scant raises and steep gas prices. For the first six months of the year, the economy grew at an annual rate of only 0.8 percent. That's the weakest stretch since the recession officially ended.

While many consumers leaned on their credit cards in June, a separate report this week showed they cut spending that month for the first time in 20 months.

Hiring has picked since then. Employers added 117,000 jobs in July, and the unemployment rate ticked down to 9.1 percent, the Labor Department said Friday. The figure was the best in three months. And the job totals for May and June were revised up.

Still, twice as many jobs are needed to lower the unemployment rate. The July figures are barely enough to keep up with the population growth.

Households began borrowing less and saving more when unemployment spiked during the Great Recession. Many have resisted pulling out their credit cards in the two years since the downturn ended.

Economists do not expect consumers will load up on debt the way they did during the housing boom in the middle of the last decade. During that period, Americans felt wealthier and more willing to take on increased debt because of the soaring value of their homes.

The Federal Reserve's borrowing report includes auto loans, student loans and credit cards. But it excludes mortgages and loans tied to real estate.