Despite its stately Federal architecture, its ties to the Revolutionary War, and its prime location along Germantown Avenue, the historic Upsala mansion — built in 1798 — might not have made it this far.

It was damaged in a massive fire in the 1930s, then faced the threat that it might become a grocery store just a few years later. It was converted to a historic house museum in the 1940s in an effort to try to save it, yet dwindling attendance — fewer than 10 visitors each year — left the property virtually unnoticed.

So when the organization that ran the museum, the Upsala Foundation, shut down in the mid-2000s, it seemed as if the centuries-old mansion's fate hung in the balance once again.

That all changed last month, when Upsala finally found its new purpose.

For the first time in nearly 80 years, the 18th-century property — known for having served as the Continental Army's staging ground in the 1777 Battle of Germantown — is returning to private ownership. In April, a couple finalized their purchase, paying $550,000 in cash for the seven-bedroom estate.

It's quite the switch for Upsala — and, really, for the Germantown-Mount Airy area, which for decades has been noted for the mansions and house museums that dot Germantown Avenue and nearby streets. Known collectively as "Freedom's Backyard," the network of 16 homes, mansions, and museums celebrates the region's role in U.S. history, particularly during the Revolution.

Here in this stretch of Northwest Philadelphia, other history abounds, as well: a house that was part of the Underground Railroad; America's first paper mill; George Washington's summer home; the place where the 1688 Germantown Quaker Petition Against Slavery was created.

Yet even that was not enough to keep visitors flowing into Upsala during its days as a house museum.

Across the country in recent years, historic house museums have become enmeshed in a heated debate. Popularized around the Bicentennial in 1976 in an effort to preserve more of America's history as development skyrocketed, house museums today have been declining in popularity as more entertainment options and changing attitudes about history have taken hold.

The result: a dispute among observers about whether too many historic house museums exist — and whether they could be better used. In 2008, the Pew Charitable Trusts estimated that there might be as many as 15,000 historic house museums nationwide — a count nearly equal to the number of Starbucks locations across the United States today. It was estimated then — no new numbers have been released — that 300 of those museums were in the Philadelphia area alone, many of them concentrated in the Old City, Fairmount, and Germantown-Mount Airy neighborhoods.

"They are all vying for attention," said Ken Turino, manager of community engagement and exhibitions at Historic New England. "… We are firm believers that these buildings should be preserved, though not all of them necessarily as a historic house museum."

Located in former private residences, in towns both big and small, these museums are typically run by volunteers or preservation societies, many of which operate with modest budgets. According to a sample of data collected by the American Alliance of Museums from 1984 to 2017, the median budget among 39 historic homes and sites in Pennsylvania that responded to a questionnaire was $164,000 a year. Most had fewer than three staff members.

For some sites, the results have proved larger and more successful, such as at George Washington's Mount Vernon near Alexandria, Va., and the Western Pennsylvania Conservancy's Fallingwater.

Located in Mill Run, Fayette County, Fallingwater was designed by Frank Lloyd Wright in 1935 and is widely considered his architectural masterpiece. According to data from the American Alliance of Museums, Fallingwater, which offers guided tours, reported a budget of $6.8 million in 2016, and a staff of more than 100. More than 180,000 people visited last year.

Other museums, such as Upsala, at 6430 Germantown Ave., have found it difficult to reach such prominence. Offering a simpler experience than larger museums of its kind, Upsala — built for John Johnson III, one of Germantown's earliest settlers — was run by volunteers who offered tours of the home, which was furnished with colonial-era antiques guarded by velvet ropes. According to the National Trust for Historic Preservation, few visitors attended each year, with the exception of guests at special events such as weddings.

As a result, preservationists and academics have been calling for historic house museums such as Upsala to rethink their mission — despite opposition from those who counter that house museums are an important part of American history. In a 2008 report published by Pew's Trust magazine, authors Marian Godfrey and Barbara Silberman argued that some new ways to preserve the properties should be considered, including everything from private ownership to community spaces.

"They are tangible reminders of our history," the authors wrote. "The problem is that, now, many of their caretakers are struggling to attract visitors, maintain the properties and make ends meet. … That has led to a troubling surplus of sites that are underused and hopelessly disconnected from their communities."

When the Upsala Foundation was dissolved, it merged with Cliveden Inc., a local nonprofit that operates the Cliveden historic house museum nearby. (Cliveden is protected by the National Trust for Historic Preservation because of its ties to the Battle of Germantown.) For nearly a decade, the two groups cared for the Upsala property, restoring it back to a livable state after years of deferred maintenance.

A few years ago, the organizations — recognizing that something sustainable would need to be done — took a big step: They put Upsala on the market.

Their expectations were broad and unspecific, said Katherine Malone-France, vice president for historic sites at the National Trust. But after decades with little repair, Upsala would need someone to keep its history alive.

"It had to be a buyer who could give it love … but also who knew what they were doing in preservation," Malone-France said. Other than that, she added, "we were open to many forms."

The offers poured in — nine submitted in total. About half were for residential use, while the others were for commercial spaces of all varieties.

"They wanted the property on the market for a long time," said Louise E. D'Alessandro, cofounder of Elfant Wissahickon Realtors, who listed the property. "They were not going to jump at the first offer."

Finally, in December, the groups chose: a married couple with plans to live in the property after some modest restorations — to the extent that the property's preservation easement allows. For now, that means slight modifications, including installing central air-conditioning.

For the most part, though, it still means relishing Germantown's history. This fall, Upsala's new tenants will welcome the yearly reenactment of the Battle of Germantown — cannons and all — to their front yard.

"For us, it's been such a lesson," Malone-France said. "Preservation can allow for buildings to be used in many different ways, and in the case of Upsala, it's full circle."

"We think we have a real model for how you can preserve a real place like this and allow it to evolve."