HARTFORD (Reuters) - Connecticut, home to hedge fund billionaires alongside cities mired in poverty, is racing against the clock to pass a budget or face further spending cuts to education and municipal aid across the state.

Nearly two months without a budget, Connecticut is getting crushed by a burdensome debt load that has squeezed spending and amplified legislative discord.

State lawmakers must agree on a biennial budget soon or else Governor Dannel Malloy’s executive order to slash state aid to municipalities and eliminate school funding for some districts will go into effect in October. The state faces a $3.5 billion deficit over the next two years.

Among the wealthiest in the United States, Connecticut has been strained by already high taxes, outmigration, falling revenues and $50 billion of unfunded pension liabilities.

Some $23 billion of outstanding municipal debt has also constrained spending. Bondholders must be paid ahead of most other expenses like non-essential services and payments to vendors.

The $2.85 billion of principal and interest the state paid on its bonds in fiscal 2017 was the highest in six years, according to preliminary unaudited information from State Treasurer Denise Nappier’s office that has not yet been published.

“The state invested in the wrong things for a period of time. It allowed its higher educational institutions to suffer while it sought to placate communities with respect to other forms of local reimbursement,” Malloy told Reuters during an interview in his office on Thursday.

“We built too many prisons, which we’re still paying off even while we’re closing them,” he said. The Democrat took office in 2011 and is not seeking a third term.

Further, the state’s budget crunch is threatening its cities including the state capital of Hartford, which is considering bankruptcy due, in part, to its dependence on state aid.

Connecticut has borrowed for decades to fund school construction, whereas nearly all other states typically borrow at the local level for those projects.

Lack of county governments means some other local costs are picked up by the state, including for all of its detention facilities.

Connecticut has piled on debt to bolster its public pensions, selling $2.3 billion of bonds in April 2008.

And again in December 2009, the state sold $916 million of economic recovery notes to close a budget deficit after depleting its rainy day fund during the Great Recession.

By many measures, Connecticut’s debt levels are the worst of the 50 U.S. states.

It has the most net tax-supported state debt per capita in the nation at $6,505, versus a median of $1,006, according to Moody’s Investors Service.

It has the highest debt service costs as a portion of state revenues, as well as debt relative to gross domestic product, Moody’s said.

Connecticut was downgraded by all three major Wall Street credit rating agencies in May.

FILE PHOTO: The Connecticut State Capitol pictured here in Bushnell Park, Hartford, Connecticut, U.S., August 17, 2017. REUTERS/Hilary Russ

Both Republicans and Democrats in the state legislature have proposed solutions, including a hard cap on annual bond sales.

Democratic legislators met with Millstein & Co., the same restructuring firm that advised Puerto Rico over its suffocating debt burden, according to The Connecticut Mirror newspaper.

Nappier proposed a new tax-secured revenue bond program in lieu of general obligation debt, which she says will lower borrowing costs and boost reserves.

But until lawmakers craft a budget, the state’s fiscal uncertainty is causing havoc among municipalities. Some are considering whether to delay the start of school or dip into reserves.

And for Hartford, the longer the state goes without a budget, the closer the city comes to a possible bankruptcy filing, said Hartford Mayor Luke Bronin, a 38-year-old former U.S. Treasury official.

“The lack of a state budget... makes a liquidity challenge come that much faster,” he said.