Spencer Platt/Getty Images

After talks of closing the only major Bronx bookstore, the Barnes & Noble at Bay Plaza has reached a last minute agreement with landlords.

Representatives from Barnes & Noble and Prestige Properties, along with Bronx Borough President Ruben Diaz Jr., announced a two-year lease extension on Thursday morning.

In a media release, Diaz said his office helped broker the compromise, which is expected to save 50 jobs.

"This is a major victory for the Bronx," Diaz said, adding he hopes both Barnes & Noble and Prestige Properties can solidify a long-term deal to keep the major bookseller in the borough.