The 77-year-old Subway Inn bar in midtown, which has been in court for two months trying to stave off eviction, will be reincarnated much as it is now, but two blocks away, its owners said Tuesday.

On Dec. 2 "the Subway Inn will close at its current location ... to begin its relocation and replication(exactly as it is now) less than 2 blocks away on the same side of the street -- at 60th and Second Avenue," said an announcement on the bar's Facebook page.

"The agreement serves both parties' best interests," said John F. Marino, a representive for the landlords, the World Wide Group, in a statement.

Marino's statement noted that the Salinas family, which owns the bar, would also keep the bar's iconic neon "Subway Inn" sign.

"World Wide is happy to have reached this agreement with the Salinas family and wish them continued success in their future ventures," Marino added.

The new Subway Inn will be the same as the old one, down to the bar stools and wall photos thanks to a "replication architect." Prices will be unchanged as well, said the owners, who thanked their many supporters. While "it may appear we lost the battle, rest assured this is not the case. Losing would have meant our home and memories would have been bulldozed," they wrote.