Rochdale have secured full ownership of their Spotland ground.
The local council is to relinquish its shares in the company that owns and manages the 96-year-old stadium.
Those shares will be transferred to the club, with the council recovering its original £100,000 outlay.
The council became one of three shareholders in the company when it was set up in 1991 to safeguard the stadium, which is also used by Rochdale Hornets rugby league club.
The Rugby League Facilities Trust were also involved in that deal, but the League One club now owns 100% of shares in the stadium company.
Rochdale Hornets have signed a new long-term lease to continue playing at Spotland as part of the new agreement.
Loans of £529,000 the stadium company has with the council will be repaid over a period of nine years.
"It has been our desire for the last 10 years to secure a deal to regain ownership of Spotland," said Dale chairman Chris Dunphy.
"The board has worked tirelessly during that time to bring our vision to fruition and today is a proud day in the club's history."