In a dramatic effort to buy the building where they live, the 90 tenants of the Kenesaw in Mount Pleasant have sacrified the money they had saved to heat their apartments this winter.

Most think the sacrifice is worth it. The $25,000 they gave is part of a $175,000 out-of-court settlement signed yesterday effectively buying out a contract held on the building by the Nemac Development Corporation of Providence.

The agreement clears the way for the tenant's purchase of a building that has become a landmark in the struggle of low-income families to save their homes from developers and speculators moving into the District of Columbia.

The Kenesaw's tenants - a wide variety of families including blacks, whites, Asians, Latinos and many children and old people - have been fighting for more than two years to buy the building at 16th and Irving streets NW from Antioch University.

Located at the heart of an area that has seen extensive speculation and displacement of longtime residents in recent years, the tenants have organized and publicized their plight at every step of their struggle.

Late last May, just as they were about to sign a $750,000 contract for the Kenesaw with the help of the D.C. Development Corporation, the Nemac Corp. entered the picture and began, in effect, a bidding war with which the tenants ultimately could not compete.

Subsequently Antioch's administration decided for reasons related to its image as a liberal, progressive institution to sell the Kenesaw to the tenants' representatives for $825,000. But a U.S. District Court ruled in August that the Nemac contract was binding.

Two months of negotiations followed, resulting in the settlement signed yesterday. Under the new arrangement, a nonprofit subsidiary of the city's housing department, the D.C. Development Corporation is to purchase the building on behalf of the tenants at a price of $890,000 at which time the tenants' $25,000 and the remaining $150,000 will be paid to Nemac by Antioch, ending the Rhode Island company's claim to the building.

If DCDC for any reason cannot complete the purchase by Dec. 29, all the tenants of the building including the Spanish Catholic Center on the first floor will have to leave within 20 days.

Among the Kenesaw's residents yesterday there was a mood of cautious optimism. "The people here are still very nervous," said Silverio Coy, organizer of the Kenesaw Cooperative. "They feel that this is their last chance, really."

They had spent most of the spring and summer holding yard sales and fund-raising parties to be able to pay the $4,000 a month it costs to heat the building through the winter - money that has now all been spent on the Nemac settlement. They are required to pay in advance for their fuel oil and their present supply with probably run out next week.

"But the people are more afraid of losing the building than they are of the winter," said Coy. He said there will be more efforts to raise money for the heat, though he does not have any idea how successful they will be. "And I'll tell you, if we get this building finally, we're going to have a big party on New Year's eve. It's going to be cold, but I think people will be warm in their hearts.