Victorians have knocked back beers at Melbourne's John Curtin Hotel for the past 160 years and can keep kicking on for at least another decade.
The Russell family, who operate the venue in the inner city suburb of Carlton, signed a 10-year lease just days before they were set to be kicked out.
The Curtin, as it is locally known, was sold to overseas developers in April, casting a cloud over its future.
"This is a really exciting day, for what has been a really stressful time since the building was sold," publican Benjamin Russell said.
The pub has long been a favourite of locals, students, musicians and unionists including former prime minister Bob Hawke.
Although the building's heritage overlay was protected by existing council rules, the Victorian Trades Hall Council launched a pre-emptive union "green ban" to prevent it being torn down.
The Russells had operated the pub on a 12-month rolling lease, which they say prevented them from renovating it.
Heritage Victoria assessed the pub as being of state-level significance and it is likely to be formally placed on the heritage register in 2023.
"I am hopeful that if the building is placed on the heritage register," Mr Russell said.
"We can work closely with Heritage Victoria to make the necessary changes the venue so desperately needs, so we can continue to host live music well into the future, and so we can continue to serve our wonderful community in the front bar for many years to come."
The fight to save the venue came after the nearby Corkman Hotel was illegally demolished in 2016, sparking public backlash.
Its developers were fined more than $1 million and jailed after failing to turn the site into a public park.