The home of the best cheesecake in the world won’t be leaving Brooklyn anytime soon, after its owner said yesterday that he rejected a $45 million bid to develop the site.

Alan Rosen, the third generation owner of Junior’s Restaurant, announced yesterday that he rethought his plans on selling the two-story building that is home to the flagship location of the eatery.

Rosen, 45, told amNewYork that he turned down offers to buy and develop the property at 386 Flatbush Avenue, including one for $45 million, because his family’s business has been too important to him and the community.

“You do a lot of soul searching during a process like this,” he said. “When you love something you realize how much it's not for sale.”

City preservationists say the eatery’s change of fate is a relief in light of a string of closures of longtime shops and restaurants in the city such as Pearl Paint store, Rizzoli Bookstore and J & R Music and Computer World.

Rosen had announced he was going to sell the 64-year-old Downtown Brooklyn restaurant in February and insisted that prospective buyers keep the restaurant open. He said at first he thought about closing the location and relocating to a nearby spot.

But after hearing the offers, he had to reconsider selling it, because some of the potential buyers showed no interest in keeping Junior’s open its original while they reveloped the site.

“Even the thought of closing for two years was too much for us to bare,” Rosen said.

Rosen’s grandfather, uncle and father opened Junior’s in 1950 and the family has been close with the staff throughout the restaurant’s history.

Rosen said he enjoys chatting with the Brooklyn regulars and visitors who want a slice of the cheesecake from the original joint, even as the restaurant has grown into a chain throughout the tri-state area.

“People have been telling me great stories when they came here for anniversary or this and that,” he said.

Margaret Newman, the executive director of the Municipal Art Society of New York, said Junior’s kept the “vibrancy in the neighborhood.” “We think there's a certain amount of diversity that each neighborhood has and I think they're very much a part of the Brooklyn culture there. They've been there as long as I've been in New York,” she said.

Simeon Bankoff, executive director of the Historic Districts Council, who has frequented Juniors, said he was proud that Rosen put his family’s legacy above the money.

“I think it's wonderful that the owner, Mr. Rosen, is showing that there are other values to be upheld rather than monetary gain,” he said.

Rosen said he had a lot of sleepless nights before coming to his decision, but was satisfied after he received tremendous feedback from customers.

“Thank you all,” Rosen said of his customers. “We will be there for them and I can’t wait to see what the next 64 years will be.”?