For more than a year, they flooded city officials’ offices with petitions, letters and calls, urging them to “save my dog park.” Dog park regulars worried it hadn’t been enough.

The dog run’s days seemed numbered earlier this year when a big, red “for sale” sign went up in Columbia Heights.

But this week, dog park advocates got some welcome — and unexpected — news: The District might be able to save the park after all. Metro, which owns the land that has functioned as an unofficial dog park since 2009, agreed this week to take the parcel off the market and let the District buy the land at “fair market value.”

That could be as much as $2.15 million, according to a Metro assessment last year.

The District could request its own appraisal, but D.C. Council member Brianne K. Nadeau (D-Ward 1) said Wednesday that the city is prepared to pay what is necessary to keep the dog park where it is.

“There’s a lot of ways this can go,” she said. “They’ll have to negotiate based on the appraised value of $2.1 million. The District may end up doing their own appraisal and coming up with a different number, and then we’ll have to go from there.”

In a letter to D.C. Mayor Muriel E. Bowser (D) from Metro General Manager Paul J. Wiedefeld, Metro said it expects the deal to be finalized by the end of the year.

“We have received inquiries from city officials and requests from many members of the community, along with Councilwoman Nadeau, that the District of Columbia be allowed to purchase and maintain the above-referenced property as a public dog park,” Wiedefeld wrote.

Community members, who formed an organization called 11th & Bark to advocate for the park’s future, said they were “cautiously optimistic.”

The plot, a dirt patch at 11th Street and Park Road NW, is one of eight parcels Metro put up for sale earlier this year. Bids were due at the end of February, but after talks with city officials, Metro said, it took the land off the market.

“I think we always have to find a balance on how we’re spending government dollars,” Nadeau said. “This preserves a green space for the community — not just for dogs but for people who want to be engaged in their community.”

The 7,355-square-foot lot is zoned for a variety of uses, including business and housing.

Critics have questioned the wisdom of funneling millions into a neighborhood dog park, instead of using the money to address issues such as homelessness or affordable housing.

In January, Nicholas Finio, associate director of the National Center for Smart Growth at the University of Maryland, co-wrote a blog post that asks, “Is it unethical to build a dog park on prime real estate in housing-strapped DC?”

“The question that has to be asked is: Should the city be spending a limited city budget on acquiring a new park for such a specific use, or should the city spend that money on affordable housing, or not spend any money and let a developer put housing there?” he said in an interview.

Two large grates on the lot, which provide ventilation for trains on Metro’s Green and Yellow lines, are required to be maintained by the buyer of the lot — a mandate Nadeau said she had hoped would deter private developers.

If the District succeeds in purchasing the park, the space will have to be renovated. As is, there is no running water or adequate drainage. To enter and exit, dog owners pass through a single gate — unlike the more secure, double-gate enclosures required at other city dog parks. On more than one occasion, dogs have gotten out.

Lori Robertson, a member of 11th & Bark’s board of directors, drafted plans years ago to renovate the park, including new grass, new fencing, fountains and a parklet on the other side of the fence for people without a dog to enjoy the space. She and her husband were hesitant to start work without knowing whether it would remain a dog park.

Depending on how much the city spends on the land, officials might look to residents to assist with the improvements, Nadeau said.

There are 12 city-sanctioned dog parks in the District, a number that placed the city at No. 22 for dog parks in a survey of the country’s 100 largest cities by the Trust for Public Land. With the official absorption of the Columbia Heights plot, the number of dog parks would grow to 13.

Arlington County, which was treated as a city in the Trust for Public Land survey, was ranked 10th in the nation for its dog parks.

In a letter from Nadeau to Wiede­feld in early March, the council member said the District has “offered to purchase the property at a ‘price equal to at least the appraised market value.’ ” She said the mayor had agreed to allocate up to $2.5 million for the purchase.

“Both the mayor and I have been pushing incredibly hard to have the opportunity to purchase this parcel for our constituents who currently use it,” Nadeau said. “Hundreds of people in Columbia Heights use this space, and it means so much to them.”