Brooklyn Brewery will be moving to the new public food hall at the Brooklyn Navy Yard. View Full Caption Brooklyn Navy Yard

BROOKLYN NAVY YARD — While Brooklyn Brewery's future in Williamsburg remains uncertain, the company has secured a new long-term home at the Brooklyn Navy Yard.

The Williamsburg-based brewery will be moving its headquarters to the Navy Yard's Building 77 with a new brewery, rooftop restaurant and beer garden, CEO Eric Ottaway told DNAinfo Monday.

The company had been eyeing new locations due to soaring rents in the increasingly expensive neighborhood as the brewery's lease at 61-71 Wythe Ave. is set to expire in nine years.

“Even though it’s a little ahead of our 2025 deadline we thought it was an opportunity that was too good to pass by,” Ottaway said of the move to the Navy Yard. “We have our long-term home in Brooklyn secured no matter what happens in Williamsburg.”

Ottaway said the company hopes to maintain a smaller brewpub and a retail space at its Williamsburg location past 2025, but it's not likely that manufacturing will remain in the neighborhood.

“While we would love to stay here, we’re being realistic,” Ottaway said. “It’s unlikely that the manufacturing side would remain at those rents.”

Brooklyn Brewery has signed a 40-year lease for 75,000 square feet of space, set to open in 2018, at Building 77, the Wall Street Journal first reported.

Ottaway said the brewery will occupy 15,000 square feet on the ground floor of Building 77’s new public food hall, where customers will be able to grab a beer at the bar and watch the manufacturing in progress.

Beer lovers will also be able to take brewery tours along the mezzanine level where they’ll get to see everything from fermentation to packaging.

And the biggest draw for visitors will be the new rooftop beer garden and restaurant on Building 77’s 16th floor, which will offer spectacular views of Downtown Brooklyn and Manhattan.

“I think it’ll be one of the coolest places in New York City to grab a beer,” Ottaway said.

Brooklyn Brewery will join famed New York City appetizing shop Russ & Daughters and Williamsburg-based chocolatiers Mast Brothers at Building 77’s new public food hall, which is set to open in 2017.