More than a hundred tenants in Los Angeles have won the right to buy the four buildings they live in from Boston University, which the university has owned since last year when the estate of major donor Frederick Pardee gifted it after his death.

After two years of advocacy, with the community’s concerns that the buildings would be sold for commercial development and the residents would be evicted, the university accepted a purchase offer this week from the Liberty Community Land Trust, a Black-owned organization working with tenants to keep their rents affordable and avoid displacement.

“B.U. has agreed in principle to offer all four properties to the Liberty Community Land Trust,” university spokesman Colin Riley said in a statement. “The University will now move forward and work with them on a purchase and sale agreement. Details will be public upon completion of the sale.”

Neither the university or the land trust disclosed the price of the accepted offer.

Pardee, a philanthropist, economist and real estate investor, died at age 90 in June. He had donated around $50 million to Boston University, his alma mater, to found and support the Pardee School of Global Studies.

Residents say the community is close-knit, with tenants in their apartments for decades.

Ninety-four-year-old Jorge Lopez and his son Jose have lived in a two-bedroom apartment in the Baldwin Hills neighborhood of South Los Angeles for 20 years after being displaced by an airport project.

Jorge Lopez came to the United States from Mexico during World War II at the age of 13. He said the home on Corbett Street is the type he’s aspired to all his life, surrounded by his community and his loved ones. Lopez walks around the neighborhood with his walker and cat Boxita, and everyone knows him by name. When he suffered a fall last year, it was his neighbors who got him to the hospital, reached out to his son and created a cocoon of shared camaraderie and help that he says he couldn’t get anywhere else.

Jose Lopez said that the buyer for the final building had dropped out, leaving the tenants’ backup pitch as a viable option. Lopez said his dad Jorge is thrilled.

“He’s ecstatic,” the younger Lopez said by phone Tuesday. “He just broke down crying, couldn’t believe it. It’s emotion and understanding that we finally have a secure place.”

Tenants and the land trust had been trying to buy the buildings over the past two years, as Pardee aged and many worried that the buildings would be sold to developers for market-rate housing after his death.

The land trust had worked in earnest when it first heard in December that the properties might be sold and a broker had begun giving tours to prospective buyers. According to Damien Goodmon, secretary-treasurer of the Liberty Community Land Trust, the properties weren’t publicly listed until they protested the possible sale.

“I would hope that they recognize that they have a duty to care about what happens to the tenants in this building and take advantage of the tremendous opportunity they have — and doing right by making sure that these buildings are put under the community control,” Goodmon said in a December interview.

“This is an area that’s undergoing rapid speculation,” he added.

Robbie Robinson has been living in the complex for more than 50 years in a couple different apartments. In December, he told GBH News he was terrified of being displaced if the the buildings were sold.

“It threatens the very core of our families, our well-being, our elderly, our children,” he said, describing how the neighbors band together to throw barbecues and birthday parties on the lawns as well as take care of their elders.

Robinson said he would be priced out if a for-profit buyer took over the buildings. “There’s no reasonable affordable housing here in the city,” he said. “It’s driving us to distraction.”

He pays just below $1,000 a month for a two-bedroom. He works full-time at a nearby hotel but says paying more in the current economy wouldn’t be an option.

The longtime fear of the Corbett tenants was that their rents would go as high as $6,000 for a two-bedroom. That’s the price to rent at the nearby luxury housing that their homes lie in the shadow of.

Boston University said the discussions with the tenant group have been civil.

“We assured [the group] ... that we would give full and careful consideration to the Trust’s offer and that we would follow up in January because the University closes the last week of the year for intersession. That is what we did,” Riley said. “We’re pleased and hopeful to see this result.”

The tenants and land trust have been urging the city of Los Angeles to pass the Tenant Opportunity to Purchase Act, which would allow for the collective purchase of buildings by community organizations, with the goal of keeping longtime tenants together and rents low. The sale is an example of how that can happen, even if it’s not codified into law. Massachusetts tenants organizations have been pushing for similar legislation on a state level for five years, but it has not passed.

Jose Lopez said the sale is an example of what's to come if tenants band together.

“We really need to look at how housing transfers hands, and how we can protect it and not just let it accidentally fall into the wrong hands. And this time, fortunately, it fell into the right hands,” he said.

The land trust owns other buildings in Los Angeles and has facilitated similar purchases in the past. The details of the sale will now need to be worked out, and tenants are hoping repairs are made to the building before the land trust takes over.

Robinson said that while there are details still to iron out, tenants are relieved.

“We’ve shared joys, highs, and lows together, wins and losses, the loss of life of family members,” Robinson said. “We’ve really gone through it together.”