Wrexham FC's shareholders and creditors have unanimously backed a takeover bid by a consortium led by millionaire Neville Dickens.
The consortium says it will safeguard Racecourse football
Creditors have agreed a £3.25m deal which sees them receive about 28p in every pound they are owed.
In a separate meeting, shareholders - who included former owner Alex Hamilton - voted in favour of the takeover.
Wrexham manager Denis Smith said: "I think it's a very good day for the club. I'm very confident".
Creditors and shareholders were asked to vote in two meetings at the Racecourse ground on Tuesday.
Mr Hamilton, who owns 78% of shares, voted by proxy for Wrexham car dealer Mr Dickens and his consortium to take over the club.
Mr Hamilton is also owed money by the club.
The club owes more than £5.4m in total, but lottery fund Sportlot and the Football Foundation are unlikely to demand repayment of £1m each, provided football continues at the Racecourse.
Wrexham went into administration at the end of 2004 with debts of more than £4m.
Steve Williams, of administrators Begbies Traynor said: "I think we have overcome absolutely every hurdle possible.
"In terms of an outcome, we couldn't better this."
Administrators took a vote from shareholders on Tuesday
The club has until 3 June to seal a deal, or it could be expelled from the Football League because it has been in administration for more than 18 months.
But Mr Williams said he was hopeful the league would extend that deadline now that a deal has been agreed.
He added: "We still need Football League consent to extend the 18-month period.
"We're extremely confident the sale will conclude."
Once the deal is completed, Mr Dickens, his business partner Geoff Moss and their consortium will own the club.
The league imposed a 10-point penalty on the club and in May 2005 the Dragons were relegated to League Two.
After several court cases, the Appeal Court in London ruled earlier this year that the administrators and not Mr Hamilton should retain ownership of the Racecourse.
Millionaire car dealer Mr Dickens is now confident he can complete the sale and has vowed to plough all future profits back into the club.
He was a club director in the 1980s and one of his garages is on land adjoining the Racecourse.
He made a bid to buy the club in April 2005 - a move welcomed at the time by the Wrexham Supporters' Trust.
Mr Dickens and Mr Moss have already submitted a planning application to develop the club's stadium.
The plans include a new stand, along with private apartments and student accommodation.