The old elm tree leans gently toward Thomas Park, as if trying to catch sight of the top of Dorchester Heights. Rising from a small patch of soil on the sidewalk, it throws a cooling shade over the bricks and asphalt below.

Yet the survival of the Civil War-era tree is in doubt, as city officials seek to remove the venerable English elm as a threat to surrounding homes and power lines.

But a band of South Boston neighbors who have come to cherish its graceful presence along the tree-lined street have rallied on its behalf, fighting the city throughout the summer and taking it to court, where a hearing on the tree’s future is scheduled for Thursday.

“It’s a part of our neighborhood,” said Kate Brown, who lives just down the street from the elm, which stands in front of a row of brick townhouses. “We thought, ‘We can’t let this happen.’ ”

Get Fast Forward in your inbox:

Forget yesterday's news. Get what you need today in this early-morning email.

The city’s tree warden, Greg Mosman, has ruled that the tree is dying and poses a high risk to surrounding property and power lines. At a meeting in May, he said the tree had large wounds at its base, a column of decay that extended 20 feet, and an unhealthy root system. The decision to remove the tree, he told neighbors, was a “no-brainer.”

“It perseveres with elegant resilience,” Kirk Barkman, a Maine arborist, wrote in a report. Barkman said the elm’s lean was modest and posed no great risk.

“I can’t see how the amount of leaf and branch mass exposed to wind above the residence could cause a tree with such a low center of gravity to upset,” Barkman wrote.

As their challenge goes before a Superior Court judge Thursday, residents say they are fighting over a larger principle: the government’s authority to remove trees it deems unhealthy without consulting the public.

“Basically a single arborist has the sole discretion to determine if a tree lives or dies,” said Amy Glynn, whose front stoop sits under the tree’s branches. “This will be our flag, a precedent to demand reform.”

A lawyer for the neighbors, Joseph Gregory, said the city should be required to hold public hearings for removal of any tree, not just healthy ones.

Residents hope their challenge brings about broader changes. “Trees have been coming down all over Southie without a public process,” Brown said.

City officials declined to comment, saying they were not at liberty to discuss the ongoing litigation.

‘A single arborist has the sole discretion to determine if a tree lives.’ —Amy Glynn, whose front stoop sits under the elm tree’s branches

The tree came to the city’s attention when a resident who lives beside the tree requested a curb cut for a driveway. The city initially ruled that the tree would interfere with the driveway and that the resident would have to request a removal hearing, neighbors said.

But after an inspection, the city ruled that the tree was in declining health.

In August, residents filed for an emergency injunction to keep the city from removing it.

“Nothing can replace the majestic apron provided by this tree,” the motion stated. “It would be a travesty to remove it.”

Neighbors also say the driveway, which they maintain is illegal, would eliminate an on-street parking space, when parking is in high demand.

So are 150-year-old elm trees, they say, looking glumly at the spray-painted X at its base.

“By the city’s own admission, the only elms that rival this one are on Boston Common,” Gregory said.