Redford Barracks was initially slated to close in 2022 as part of a package of cuts announced by then-defence secretary Michael Fallon in November 2016.
But plans have now been temporarily shelved after Ministry of Defence (MoD) bosses revealed the closure date had been pushed back to 2025.
The proposals had previously been criticised for having a “complete disregard” for the jobs and communities who depended on the base.
However, speaking in the Commons on Thursday, defence minister Tobias Ellwood MP announced Redford was among 29 infantry headquarters to have its closure date deferred.
An MoD document listed the reason for the delayed closure was taken “following detailed work to assess the optimum laydown required to support operational capability”.
SNP MP Joanna Cherry welcomed the move and called on plans to be drawn up for the land to be handed over for community use when the facility shuts its doors.
She added: “Redford barracks has stood proudly for more than 100 years in Scotland’s capital city, yet this Government are threatening its closure with an adverse impact on both service personnel and the local community.”
“I am pleased that there has been a further delay and I hope the MoD will use this time to engage with City of Edinburgh council and release this land for community benefit rather than selling it to the highest bidder for luxury housing.”
Labour councillor Scott Arthur echoed her view, adding: “This welcome decision means that Redford Barracks will remain operational until after the next general election. This gives hope to those of us that want the barracks to remain at the heart of my ward.”
“Nonetheless, I hope the Council use this extra time to bring forward a robust plan for the future of the site that delivers both employment and affordable homes.”
The barracks were built between 1909 and 1915 and was originally designed to accommodate a thousand military personnel.
At the time of their construction, the barracks were the largest military installation in Scotland since Fort George, near Inverness.
In 2011 it was included on an MoD closure list announced by the then defence secretary Liam Fox.
But two years later his successor, Philip Hammond, reversed the plan, which also included building a brand new “super-barracks” at Kirknewton in West Lothian.
Cllr Jason Rust said: “Clearly any strategic move involves a number of factors and it is good that appropriate time is factored in.”
He added: “I welcome the delay in closure which will give more time to get the optimum future solution for this valuable site and for our local community and amenity as well as for the military personnel.”