WASHINGTON (AP) — Income inequality is taking a toll on U.S. state governments.

The widening gap between the wealthiest Americans and everyone else has been matched by a slowdown in state tax revenue, according to a report being released Monday by Standard & Poor's.

Even as income for the affluent has accelerated, it's barely kept pace with inflation for most other people. That trend can cause two problems for states: The wealthy often manage to shield much of their income from taxes. And they tend to spend less of it than others do, thereby limiting sales tax revenue.

As the growth of tax revenue has slowed, states have faced tensions over whether to raise taxes or cut spending to balance their budgets as required by law.

"Rising income inequality is not just a social issue," said Gabriel Petek, the S&P credit analyst who wrote the report. "It presents a very significant set of challenges for the policymakers."

Stagnant pay for most people has compounded the pressure on states to preserve funding for education, highways and social programs. Their investments in education and infrastructure have also fueled economic growth. Yet they're at risk without a strong flow of tax revenue.

The prospect of having to raise taxes to balance a state budget is a politically delicate one. The allure of low taxes has been used by states to spur job creation, by attracting factories, businesses and corporate headquarters.

"If you've got political pressure to spend more money and pressure against raising taxes, then you're in a pickle," said David Brunori, a public policy professor at George Washington University."

Income inequality isn't the only factor slowing state tax revenue. Online retailers account for a rising chunk of consumer spending. Yet they often manage to avoid sales taxes. Consumers are spending more on untaxed services, too.

S&P's analysis builds on a previous report this year in which it said the widening gap between the wealthiest Americans and everyone else has slowed the U.S. economy's recovery from the Great Recession. Because consumer spending fuels about 70 percent of the economy, weak pay growth typically slows economic growth.

Adjusted for inflation, government data show that median household income rose by a few thousand dollars since 1979 to $51,017 in 2012 and remains below its level before the recession began in late 2007. By contrast, the top 1 percent has thrived. Their incomes averaged $1.26 million in 2012, up from $466,302 in 1979, according IRS data.

The combination of an increasingly global economy, greater productivity from technology and outsize investment returns has shifted a rising share of money to the wealthy. Of all the dollars earned in 2012, more than 22 percent went to the top 1 percent. That share has more than doubled since 1979.

Before income inequality began to rise consistently, state tax revenue grew an average of 9.97 percent a year from 1950 to 1979. That average steadily fell with each subsequent decade, dipping to 3.62 percent between 2000 and 2009.

The most affluent Americans typically receive most of their income from profits in stocks and other investments, rather than wages. This means that swings in financial markets can cause state revenue to gyrate from year to year.