Sheya Wieder owned a small old house on a large lot in Borough Park, Brooklyn, until about six years ago, he said, when he decided it was time to knock it down and build an upgrade. He was all set to go when it occurred to him that the big, shady tree, standing tall and proud right where his new stoop would go, might cause a problem. He took a branch to Brooklyn Botanic Garden, where he was told it was a mulberry tree.

“The rabbis wouldn’t let me take it down,” Mr. Wieder said. “They told me if there is any possibility, even if it costs you money, you should work around it.”

So he did.

Today, a black metal staircase wraps partly around the tree, and a beige wheelchair-accessible elevator stands beside it. The tree looks perfectly happy, right there in front of the door.

“It cost me over $100,000 to save it,” Mr. Wieder said.

In certain Orthodox Jewish communities, from Borough Park to Monsey, N.Y., rabbis say, there is a strong aversion to chopping down fruit trees, which results from some combination of biblical verses, Jewish law and mystical documents that prohibit destroying them wantonly. In New York City, where space is tight and the option to build out in another direction generally does not exist, that means friendly neighborhood foliage can present an especially hard challenge.