The logo of Barclays bank is seen at its office in the Canary Wharf business district of London April 1, 2013. REUTERS/Chris Helgren

(Reuters) - Barclays Plc (BARC.L) will provide cash-strapped Detroit with up to $350 million in debtor-in-possession financing in the wake of its municipal bankruptcy filing in July, Detroit's top official said on Friday.

Detroit will use the money for infrastructure investments and to terminate interest-rate swap agreements that were not advantageous for the city, said Kevyn Orr, the city's state-appointed emergency manager.

Detroit is the first large U.S. city to seek so-called debtor-in-possession (DIP) financing after filing for Chapter 9 municipal bankruptcy on July 18. The city said it plans to ask for a November hearing on the financing, which is subject to federal bankruptcy court approval.

Detroit, with at least $18 billion of debt and obligations, is the largest U.S. city to ever have filed for bankruptcy.

About $230 million of the financing's proceeds will be used to end swap contracts the city entered into with Bank of America Corp's (BAC) Merrill Lynch Capital Services and UBS AG (UBSN.VX) in conjunction with debt sold for Detroit's public pension funds.

Bill Nowling, Orr's spokesman, said the DIP financing was needed for the city to execute the swap termination deal with Merrill Lynch and UBS that Detroit asked the bankruptcy court to approve over the objection of bond insurers, some bondholders, the pension funds and others. He said court mediation with bond and swap insurer Syncora Guarantee Inc (SYCRFS.UL), the main objector, was continuing.

Without the deal, terminating the swaps could cost an additional $60 million.

The city would use the rest of the proceeds from the DIP financing - about $120 million - to improve public safety and other basic services, remove blighted properties and boost technology infrastructure, Orr said.

Detroit has seen its population shrink to about 700,000 from 1.8 million in the 1950s, when Detroit's three automakers dominated the industry. In recent years, the city has made international headlines with its urban blight, roaming packs of feral dogs and outdated and sometimes inoperable police and fire equipment.

The financing will be secured with a pledge of Detroit's income tax and casino tax revenue and if those funds are not sufficient, "net cash proceeds from any potential monetization of city assets that exceeds $10 million," according to the statement.

Nowling said while the deal with Barclays doesn't specify particular city assets, anything that could be potentially monetized, including assets at the Detroit Institute of Arts, is on the table.

"We haven't made a decision about selling anything," he said.

Barclays will have priority over certain claims - all administrative expense, post-petition and pre-petition unsecured claims. Orr has deemed $11.9 billion owed by the city to its pension funds, bondholders, retirees and others to be unsecured debt.

The financing will carry the London Interbank Offered Rate (LIBOR) plus 2.5 percent, subject to market fluctuations, and will have an outside maturity date of 30 months from the closing date.

The city chose Barclays in a competitive process conducted over the past month that resulted in 16 proposals from financial institutions, Orr's statement said. Barclays' proposal was deemed "the most advantageous based on structure and pricing," it added.

Detroit heads to a trial later this month to prove it is eligible for bankruptcy.

(Reporting by Karen Pierog in Chicago; additional reporting by Hilary Russ in New York and Joseph Lichterman in Detroit; Editing by Diane Craft, Nick Zieminski and Lisa Shumaker)