The United States has an infrastructure problem. Globally, the U.S. ranks 19th — behind Spain, Portugal and Oman — in the quality of its infrastructure, according to the World Economic Forum’s Global Competitiveness Report. The American Society for Civil Engineers (ASCE), in its annual Infrastructure Report Card, gave the U.S. a D+, saying we need to invest some $3.6 trillion by 2020 to upgrade our infrastructure.

Yet investment in U.S. infrastructure continues to lag, even as jobs growth, GDP growth and home sales all have rebounded since the end of the recession. Economists have long argued that better infrastructure — roads and highways, bridges and ports, tunnels and dams — results in greater jobs growth and business investment. So as government finances improve, why aren’t we seeing infrastructure spending return?

Quantifying infrastructure investment is a challenge, but one place to start is by looking at the amount of money the government spends on buildings and large-scale projects. Nationwide, public construction spending is just over 1.5 percent of GDP — the lowest share since 1993. Public construction does not exactly equate with infrastructure investment, but it’s a fair proxy.

The answer to what’s holding back U.S. infrastructure investment lies not so much with President Obama and Congress as with county commissioners and state legislatures.

Most of the money spent on building schools, highways and waste disposal facilities comes from state and local governments, not from the federal government. As of April 2014, more than 90 percent of the $267 billion spent by the public sector (at a seasonally adjusted annual rate) was at the state and local levels, according to the latest Census Bureau report on construction spending.

State government spending has grown over the the last few years as fiscal balances have improved. For the first time in five years, no state is expected to run negative balances in both its general and rainy day funds, according to the latest Pew Charitable Trusts Fiscal 50 report.

So why aren’t states pulling the trigger on big capital projects? First, states are continuing to struggle with the legacy of the financial crisis, paying down debt they acquired during the boom years. And second, many state transportation projects are in limbo as the federal government’s Highway Trust Fund is expected to run out of money in August, unless Congress replenishes it.

State and local governments remain heavily indebted. They’re on the hook to pay pensions and benefits to retired government workers, and they borrowed a lot of money in the capital markets in the run-up to the 2008 financial crisis. As a result, they’ve been more focused on paying down debt than on investing in big capital projects — and in some cases, they’re proud of that. Florida’s transportation secretary, Ananth Prasad, spoke with me last week and pointed out that Gov. Rick Scott has paid down $3.6 billion in state debt.

In the chart below, showing state debt levels, the apparent spike in 2004 is due to the a revision of the Federal Reserve’s Flow of Funds statistics to reflect a change in data sources, which resulted in municipal debt levels being revised up by $740 billion.

To finance big infrastructure projects, state and local governments usually go to the municipal bond market, but in the last few years, they’ve issued few bonds for new capital projects despite historically low interest rates, according to the Securities Industry and Financial Markets Association, a trade group. (Much of the current municipal bond issuance seems to be refinancing.)

The federal government does play a critical role in one area of infrastructure: transportation. Nearly 30 percent of all transportation funding comes from the federal government, with state and local governments making up the rest, according to another recent Pew study. A regular and important source of financing comes from the federal Highway Trust Fund, a program that uses revenues from the federal gas tax to fund state transportation infrastructure.

The HTF typically distributes around $40 billion to $50 billion each year. According to the Congressional Budget Office, the HTF is set to have a balance of $1 billion at the end of this fiscal year. That means even a state like Florida, which has seen its fiscal health improve, won’t be spending as much money on bridges, roads and tunnels.

Florida receives about $2 billion per year from the HTF, and about 35 percent of Florida’s transportation budget is reliant on federal funds, Prasad said. “There will be impact — but if it’s a short-term impact, we can weather better than other states,” he said.

The HTF’s revenues from the gas tax are falling for the same reason gas taxes at the state and local level are falling: People are driving less and, when they do drive they’re using more fuel-efficient vehicles.

Raising the federal gas tax is a non-starter, and Congress can’t agree on whether to make up the shortfall, as it has in recent years. Without that funding, and with state debt levels still high, we won’t see very many new bridges any time soon.

CORRECTION (June 3, 12:25 p.m.): An earlier version of this article incorrectly said that no state was expected to tap its rainy day fund. In fact, states may tap their rainy day funds — both West Virginia and Michigan already have this year — but no state is expected to see its total general and reserve funds fall below zero.