Sir Paul has waived his fee to take part in the event
Sir Paul McCartney's summer concert in Liverpool was in danger of cancellation until a last minute deal was reached with his company, the BBC has learned.
Liverpool City Council gave £1.7m to McCartney Productions Ltd (MPL) on Monday to stage the Anfield event.
A report, seen by the BBC, said that not agreeing the deal "was likely to result in the concert being cancelled".
All 25,000 tickets for the event were sold in a ballot last year. A further 11,000 may now be made available.
The extra tickets, which are subject to licence, would generate an extra £200,000 for the concert budget.
Neither Sir Paul or Liverpool Football Club are making money from the Liverpool Sound concert, billed as a Capital of Culture highlight.
The £1.7m covers costs such as stage and lighting hire, licence fees and insurance.
The deal reached with MPL means the company will organise and stage the concert, with the council liable for any budget overspend.
The report into the budget - which was given to the BBC - revealed that arrangements for finalising the production were negotiated in the last few weeks.
The report states: "The alternative of not agreeing to these arrangements is likely to result in the concert being cancelled with significant reputational loss to both the Culture Company Board and the City Council."
The report also revealed that funds for MPL to get started on the organisation were made available on Monday - seven weeks before the concert is due to be held.
The council will meet the cost of any overspend as part of the agreement, but must sign off any additional costs not already agreed in the budget.
Phil Redmond, creative director of the Liverpool Culture Company, told BBC Radio Merseyside, he was optimistic the event would go ahead.
"I am as sure as anybody in my position would be at this stage, but I'm not going to come out here and say to McCartney's people, 'This concert will happen no matter what the cost.'
"This is what his men are paid for. They are paid to get the best deal and protect him. He's not taking a fee for it but everything around it still has to be paid.
"I'm not going to say, 'This concert will go ahead regardless,' because at the end of the day there always comes a line when you say this is not worth it."
MPL has not responded to phone calls from the BBC.