The Scottish Football Association has finally clinched a deal with Queen's Park to buy Hampden.
The governing body's lease on the National Stadium expires next year and an option to move major cup finals and Scotland matches to Murrayfield was explored before being ruled out last year.
But SFA bosses made it clear they would only keep their base on the slopes of Mount Florida – which has been home to the Scottish national team since 1906 – if they were given the keys to the stadium for good.
Now following nine months of protracted negotiations with Queen's Park, a fee – reported to be £5million – has been agreed for the purchase of the 52,000 seater arena.
In a statement, the SFA said it had "concluded a legally binding agreement with Queen's Park FC for the transfer of ownership of Scotland's National Stadium, Hampden Park".
It added: "Heads of terms were signed in September last year after a period of dialogue and after further discussion on structural and financial aspects of the agreement, a formal legal offer was issued on behalf of the Scottish FA on 7 June, 2019.
"We have now received notification from Queen's Park that they have accepted the final and binding deal.
"Key stakeholders including Scottish Ministers, sportscotland, Big Lottery Fund and Glasgow City Council have been informed of this formal agreement and the transfer of ownership will take place on 1 August, 2020 – after Hampden Park hosts its UEFA EURO 2020 fixtures.
"The board of the Scottish FA will now seek to ensure ownership of Hampden Park is a game-changer for the Association, its members and all its stakeholders."
SFA chief executive Ian Maxwell says plans to upgrade the historic home of Scottish football and the poor vantage points which have long frustrated supporters are already being considered.
New SFA president Rod Petrie added: "Given the hard work from everyone since the agreement of last September, I am pleased we now have a legal contract with one of our member clubs for the good of Scottish football.
"The real work begins now to ensure Hampden Park can continue to serve the needs of the game and be an inspirational home for Scottish football in the future.
"We can build on the short-term work currently undertaken to make Hampden Park, Glasgow and Scotland a memorable Host City Venue for the forthcoming UEFA EURO 2020 finals."
ga('create', 'UA-72310761-1', 'auto', {'name': 'pacontentapi'});
ga('pacontentapi.set', 'referrer', location.origin);
ga('pacontentapi.set', 'dimension1', 'By Andy Newport, Press Association Sport');
ga('pacontentapi.set', 'dimension2', '7bcc9f6c-8e85-4cab-b304-1fe3048cdc4c');
ga('pacontentapi.set', 'dimension3', 'paservice:sport,paservice:sport:football');
ga('pacontentapi.set', 'dimension6', 'story');
ga('pacontentapi.set', 'dimension7', 'composite');
ga('pacontentapi.set', 'dimension8', null);
ga('pacontentapi.set', 'dimension9', 'sport:football');
ga('pacontentapi.send', 'pageview', { 'location': location.href, 'page': (location.pathname + location.search + location.hash), 'title': 'SFA clinches deal with Queen\u2019s Park to buy Hampden'});