Connecticut borrowed $300 million through a direct bond placement with Barclays Capital Inc. at the end of June, a deal that a state Treasury official said had been planned for some time and was not related to the state’s budget crisis.

Lawmakers and Gov. Dannel Malloy disagree over how to close a $5.1 billion deficit over the next two years, including whether to cram some pension costs down onto municipalities.

The state, with median income levels among the highest of all states yet one of the lowest ratings, was downgraded by all three of the big Wall Street credit rating agencies in May.

For municipal bond investors, it could be a minefield.

Connecticut’s credit spreads have widened to 92 basis points over top-rated muni bonds, Thomson Reuters Municipal Market Data shows, especially after lawmakers ended their regular legislative session June 7 without a two-year budget for fiscal 2018 and 2019.

Connecticut muni bond funds have not performed well. Of 21 different share classes run by six different fund managers, 17 have underperformed other state debt fund averages over the past year, according to Lipper, a Thomson Reuters unit.

The deal is the last for Connecticut’s fiscal year. The new money variable-rate tax-exempt seven-year general obligation bonds priced at 90 basis points over the benchmark variable rate set by the Securities Industry and Financial Markets Association. The interest rate resets weekly and Moody’s Investors Service rates the bonds A1.

Proceeds will fund capital improvements to state universities and colleges, grants to towns, housing programs and technology upgrades, according to Sarah Sanders, assistant treasurer for debt management.

It also sold $135 million of refunding bonds to JP Morgan Chase & Co. at 70 percent of the London Interbank Offered Rate plus 70 basis points. That deal matures in seven years, she said. Both series have some call features.

The state requested proposals for the deal from its general obligation senior managing firms, and selected the direct placement option with Barclays because it was easier to accomplish and cost competitive, Sanders said.