The St. Dennis in Mt. Pleasant.

You could write a movie script about the St. Dennis. Everything is there — a villain, in this case a developer; a victim, here three women from El Salvador; and a happy ending. which came to pass yesterday, as the victims emerged the victors in a battle that spanned years and pitted the downtrodden against the well-heeled.

Long story short: in 2004, developers set their sights on the building located at Kenyon and 17th Streets in Mt. Pleasant, hoping to turn it into high-priced condos in the fast-gentrifying neighborhood. Bit by bit, they chased away residents, but three steadfastly refused to leave — Eva Martinez and her daughters, Anabell and Eva Aurora. Despite persistent efforts that spanned money (they were offered $100,000 at one point and turned it down), intimidation and legal trickery, the family gained pro bono legal representation from Arnold & Porter and, with the help of the District’s Housing Production Trust Fund and the National Housing TrustEnterprise Preservation Corporation, were able to purchase the crumbling building.

Yesterday, on a glorious afternoon, Anabell and Eva Aurora — their mother died in April 2009 — were welcomed back to the building, which since its 2008 sale had undergone a $10 million renovation and redevelopment. Over $4 million went into everything from new windows to wiring and a water system; the work done cost more than the building’s purchase price of $3.6 million. (DCMud had a great write-up in May on the renovation process, which included saving the building’s crumbling rear wall.)

Of the 32 units, eight are set aside for use by the D.C. Housing Authority, while the remaining units — a mix of one- and two-bedroom apartments — are limited to tenants that make less than 60 percent of the Area Median Income (AMI). A two-bedroom in the building, for example, goes for $1,311 a month. So far, 10 people have moved in, but most other units will be filled by the end of October.

“It’s totally different,” said Anabell of the building. “We’re very happy. Because now it’s a building that’s been totally renovated, nothing like how we used to live with many code violations. Today, the building’s all nice.”

During a ceremony inaugurating the building, speaker after speaker recognized the family’s refusal to leave quietly as the single thing that kept the building open to low-income families. Scott Kline, vice-president of the National Housing Trust, said that the new St. Dennis was “testament to the tenacity of the Martinez family,” while Councilmember Jim Graham (D-Ward 1) read them a ceremonial resolution from the D.C. Council declaring the day “St. Dennis Victory Day.”

Of course, like many success stories in the District, this one is complicated.

The Housing Production Trust Fund, the very one that allowed the St. Dennis to remain accessible to low-income renters, has seen a decline in resources in recent years. Mayor Vince Gray’s 2012 budget moved $18 million from the program into rental assistance, though it said that an increase in real estate taxes throughout the year would make up for the shortfall. But according to the National Housing Trust, a “lack of funding has made it increasingly difficult for nonprofit affordable housing developers to compete with market-rate developers in D.C.’s rebounding rental market and save affordable housing like St. Dennis.” Graham called the loss of funds “crippling,” and said the struggle to save it continued.

Still, John Hall, the director of the D.C. Department of Housing and Community Development, stressed that despite limited resources, success stories like the St. Dennis were nonetheless important victories in the fight for affordable housing.

“It’s not very often that we get these great stories from the resources that we’re able to contribute to projects, and so today is an especially grateful day for us and the staff as we can see how our efforts go into actually impacting in a positive way the lives of so many who are well-deserving of a quality, descent and safe place to live,” Hall said.