It took nearly a decade, but debt has made a comeback.

Americans have now borrowed more money than they had at the height of the credit bubble in 2008, just as the global financial system began to collapse.

The Federal Reserve Bank of New York said Wednesday that total household debt in the United States had reached a new peak — $12.7 trillion — in the first three months of the year, another milestone in the long, slow recovery of the nation’s economy.

The growing debt level shows that many of the millions of Americans who struggled during the recession have sufficiently repaired their credit to qualify for loans. It also suggests a rising optimism about economic growth among banks and other lenders.

Debt can fuel consumer spending, which accounts for nearly 70 percent of all economic activity in the United States. It also allows Americans to make large investments in education and housing, which can help build personal wealth and financial stability.