Interserve - one of the UK's largest providers of public services - has reached a deal with creditors to prevent its collapse.
The rescue plan involves cutting its debts from over £600m to £275m by issuing new shares.
Chief executive Debbie White said it was "a significant step forward in our plans to strengthen the balance sheet".
Interserve sells services, including probation, cleaning and healthcare, and is involved in construction projects.
"The board believes that this agreement will secure a strong future for Interserve," Ms White added.
The firm - a major government contractor - plans to issue £480m worth of new shares, which will be swapped with creditors for debt, leaving existing shareholders with virtually nothing.
Under the rescue deal, Interserve will also keep its most profitable division, its RMD Kwikform construction business, loading £350m of debt onto its balance sheet.
The firm had considered spinning the unit off to its lenders to raise money.
Interserve has a market value of £17m, down from £500m in 2017, and a turnover of £3.2bn. About 70% of Interserve's turnover comes from government contracts.
Stephen Rawlinson, an analyst at Applied Value, said that Interserve's woes are not as bad those of fellow outsourcer Carillion, which collapsed in January 2018 and put thousands of jobs at risk and cost taxpayers £148m.
"For existing shareholders, they're between a rock and a hard place, they have been for the last six to 12 months, so there's no difference, but now there is hope," he told the BBC.
"I don't think another Carillion is likely, as the government has realised that to put these companies into liquidation is a very foolish thing to do."
However, he warned that the deal had not yet been approved by shareholders, and that it would probably take up to seven years before Interserve returned to profitability.
This is the second rescue deal for Interserve, with the company refinancing its debt in March last year.
Its troubles have been blamed on cancellations and delays in its construction contracts as well as struggling waste-to-energy projects in Derby and Glasgow.
The firm's shares have plunged over the past year, currently trading at around 13p each. Just over a year ago, the shares were worth 100p each.
Following Carillion's collapse, the government launched a pilot of "living wills" for contractors, so that critical services can be taken over in the event of a crisis. Interserve is one of five suppliers taking part.
In a separate statement, shareholder Coltrane Master Fund, which holds over a 5% stake in Interserve, has asked the firm to remove eight directors.
It requested two other individuals be appointed as directors, but reiterated its support for Ms White as chief executive of the outsourcing provider.
What does Interserve do?
From its origins in dredging and construction, the company has diversified into wide range of services, such as health care and catering, for clients in government and industry.
At King George Hospital in east London, for instance, Interserve has a £35m contract for cleaning, security, meals, waste management and maintenance.
Its infrastructure projects include improving the M5 Junction 6 near Worcester, refurbishing the Rotherham Interchange bus station in Yorkshire, and upgrading sewers and water pipes for Northumbrian Water.
But Interserve is also the largest provider of probation services in England and Wales, supervising about 40,000 "medium-low risk offenders" for the Ministry of Justice.