The Bronx’s only full-service bookstore, on the brink of closing, will remain open after a frenzied campaign by the borough’s leaders and residents to save it.

Barnes & Noble executives said on Thursday that its store in Bay Plaza in Co-op City will remain open for two more years, reversing an earlier decision to close it after the year-end holidays. The announcement followed efforts by Ruben Diaz Jr., the Bronx borough president, to negotiate a compromise between the bookseller and its landlord, Prestige Properties & Development.

“Remember, this is more than just a bookstore,” Mr. Diaz said at a news conference Thursday at the Co-op City store, where he was flanked by local officials and representatives from Barnes & Noble and Prestige Properties. “This is where kids read and broaden their minds and do their homework.”

Barnes & Noble and Prestige Properties had reached an impasse in recent weeks over the renewal of the store’s lease, which was to expire in January. An option to renew had called for a rent increase under a previous agreement. Prestige Properties will now allow Barnes & Noble to extend its existing lease for two years with no rent increase, according to Sam Shalem, chairman and chief executive of Prestige Properties.