Surrey and Sussex Healthcare trust is to get £34m in regional NHS cash to help it pay back a £56m loan from the Department of Health.
The trust, identified by the DH as one of the 17 most "financially challenged", announced it had agreed a deal with the department, NHS South East Coast, and West Sussex and Surrey primary care trusts.
The package will mean that the trust can pay off the loan in three years instead of 25. It will pay£21.9m by 2011 out of its own surpluses, but the rest will be made up of cash from the strategic health authority.
Trust chief executive Gail Wannell said the deal recognised the trust's "considerable" improvements.
The trust is predicting a break-even position for 2007-08 from a£28m in-year deficit in 2005-06.
Conservative MP for Reigate Crispin Blunt had called for the government to write off the loan, but in January health minister Dawn Primarolo said that was not an option.
The DH said plans agreed with the 17 financially challenged trusts had not involved writing off debt.