Crystal Palace have been saved from extinction after an agreement in principle was reached for CPFC 2010 to buy the club and Selhurst Park.
Administrator Brendan Guilfoyle gave them until 1500 BST on Tuesday to reach agreement with Lloyds Bank or he would start to liquidate the club.
Hundreds of fans protested outside the bank's offices prior to the deadline.
But an 11th hour deal was reached with CPFC 2010, which is headed by Palace fans Steve Parish and Martin Long.
A statement from Lloyds Bank read: "Stadium administrator Pricewaterhousecoopers has reached an agreement in principle with CPFC 2010 in relation to the sale of Selhurst Park.
"This enables the consortium to go ahead with the purchase of both the Crystal Palace Football Club and Selhurst Park."
Problems arose over the takeover when the Bank of Scotland - part of the Lloyds group - agreed to sell the ground to CPFC 2010 for a price lower than a property developer would have been prepared to pay but then asked for a share of any profit if it was sold again.
The consortium agreed, but thought there should be a cap on that potential "further return" if it was a result of Palace having success on the pitch or ploughing more money into their infrastructure.
Before the announcement, administrator Brendan Guilfoyle said he had already received bids from other clubs to buy Palace players despite CPFC 2010 indicating its offer would be withdrawn if players were sold.
On Tuesday, the headquarters of Lloyds Bank, who own Bank of Scotland, was the focus of a protest by Palace fans.
This followed a demonstration by around 1,000 supporters outside Selhurst Park on Monday.
Palace avoided relegation from the Championship under manager Paul Hart on the final day of the season with a 2-2 draw at Sheffield Wednesday that condemned the Owls to League One.
It was just another twist in a turbulent year so far, after the club was docked 10 points for going into administration in January.
Manager Neil Warnock left to join QPR and star striker Victor Moses was sold to Premier League side Wigan.
The club currently does not have the money to pay their staff wages for May and on Friday made 29 people redundant.
Midfielder Darren Ambrose, who has been linked with a move to QPR, goalkeeper Julian Speroni and defender Clint Hill are among the players who are likely to attract the attention of other clubs if Palace are forced to sell.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.