Transport for London (TfL) has secured £1.6bn in emergency funding to keep Tube and bus services running until September.
Mayor Sadiq Khan had warned the body was close to running out of money.
But shortly after Transport Secretary Grant Shapps said he was “optimistic” of finding a solution the deal was announced.
The BBC has been told a £500m loan agreed with the Department for Transport forms part of the total.
Speaking at Thursday’s Downing Street press briefing, transport secretary Grant Shapps said: ‘We don’t know what the long-term will be.
“But in the short-term trains and buses will continue to run.”
If no deal was reached, TfL said, it would have to publish an unbalanced budget under the requirements of the Local Government Act.
It would also have been forced to issue a Section 114 notice – the equivalent of a public body going bust – which would ban it from spending any new cash.
By BBC Political Editor Tim Donovan
The government bailout comes with conditions – the mayor is expected to restore a 100% Tube service as soon as possible.
He is also expected to carry Stay Alert advertising on the transport network, report staff absenteeism rates to civil servants and allow government officials to attend TfL board meetings.
There will also be a longer-term review of TfL finances.
Sadiq Khan is understood to have offered to raise fares by one percent above inflation in future – a pledge he had made for the Tube during the campaign for this year’s mayoral election which has now been deferred by a year.