Oldham Athletic have agreed a deal to buy Boundary Park as a court case, which could see the club go into administration, was adjourned.
Friday's hearing at the Civil Justice Centre in Manchester related to a loan and unpaid rent owed to Brass Bank, who own the club's stadium.
The adjournment comes after a "significant" sum of the debt was paid.
The club and Brass Bank hope they can finalise the sale of the ground before the case resumes on 21 April.
In a statement, Oldham said they had reached an "in-principle agreement" with Brass Bank to buy both Boundary Park and the surrounding land.
They also said they hope to reopen the North Stand, which was closed by the local Safety Advisory Group in January, after completing safety improvements ordered by Oldham Council.
"We know that this has been a very unsettling time for the fans and all associated with Oldham Athletic AFC," the club said.
"We believe this to be the right deal for the future of the club and that it will, once complete, put us in a far stronger position to be able to deliver the experience, football and results we all desire."
The Latics are 17th in League Two after 36 games, 19 points above the solitary relegation place in the division.
However, the club would be subject to a 12-point deduction if they went into administration before 26 March, as set out in English Football League rules.
Any insolvency event after that date would result in a points deduction being applied next season.
The court also heard that Oldham have settled their tax debt with HM Revenue & Customs, who brought a winding-up petition against the club to be heard in the High Court on Wednesday, 18 March.
A media report on Friday claiming that there was an agreement for the club to be sold to former Watford owner Laurence Bassini was labelled as false during the hearing.
BBC Radio Manchester's Mike Minay at the Civil Justice Centre, Manchester
Both parties agreeing that administration was not the way forward will hopefully indicate a peaceful end to a long-running saga.
Judge Eyre QC agreed that forcing administration would only bring further "complications and expense".
EFL guidelines highlight when a 12-point deduction takes place, with such punishment being applicable to this season if carried out by 17:00 on the fourth Thursday of March - anything after would come in 2020-21.
Judge Eyre QC said he would have considered administration on Friday if a 12-point deduction had made an "absolute difference" to the sole relegation space in League Two. With the Latics currently 19 points above the drop, this was decided not to be the case.
Oldham, and the club's owner Abdallah Lemsagam, have six weeks to now pay the outstanding debt - a six-figure sum.