SAN JUAN, Puerto Rico (AP) — The U.S. Census Bureau says nearly 80 percent of Puerto Rico’s municipalities saw their population drop by more than 5 percent in recent years amid a deep economic crisis.

Officials said Thursday that 10 of the island’s 78 municipalities experienced a 12-13 percent loss in population from July 2010-July 2016. Among them was the capital of San Juan.

Overall, about half a million people have left the U.S. territory since 2005. The majority sought jobs and a more affordable cost of living in the U.S. mainland.

The loss of population has shrunk Puerto Rico’s tax base amid a 10-year economic slump as the government struggles to find revenue and restructure some $70 billion in public debt.

Some 3.4 million people now live on the island.