Two debt-ridden Midlands hospital trusts are being bailed out by primary care trusts and the region's strategic health authority.

University Hospital Coventry and Warwickshire NHS Trust and Royal Wolverhampton Hospitals NHS Trust will also sell off land and buildings to help reach "a robust financial position" by 2013.

The private-sector funded £410 million University Hospital is carrying debts totalling £50.5 million, which includes a £40 million cash deficit.

Trust bosses faced axing up to 200 jobs, but NHS West Midlands strategic health authority has worked out a funding package after the Department of Health and the SHA asked KPMG to assess the trust's financial needs to break even. To achieve this hospital bosses will need to pay back £16 million raised from selling off land by 2013 and through better use of resources.

Coventry and Warwickshire PCTs will each contribute £2 million annually for five years, with the SHA funding the balance of £14.5 million, to reduce the trust's deficit to £10 million.

Royal Wolverhampton Hospitals NHS Trust has agreed to pay back debts totalling £21 million by raising £3.2 million from the sale of the city's Eye Infirmary and a £5.5 million efficiency savings by 2012/13 .

Wolverhampton City PCT will contribute £6.2 million to the package, with the SHA providing £6.1 million. The SHA will fund the balance of £6.1 million.

Both trusts have five years to repay their historical deficits, from 2008/2009.

Peter Shanahan, the SHA's director of finance and investment, said: "Agreements have been reached which will give these hospitals a secure financial basis. This represents the best solution for both trusts and gives them a solid platform to make further efficiency savings whilst delivering sustainable services."