SAN FRANCISCO — A wealthy San Francisco couple notched a record nearly half-million-dollar buyout to vacate their luxury apartment of three decades, an indication of what some landlords are willing to pay for tenants to give up their longtime home in a city with strict rent control and soaring market rents.

The $475,000 buyout is considered to be the largest in city history and reflects the high-value of the apartment. The tenants, a couple in their 60s with teenage children, had been paying $12,500 a month for a seven-bed, eight-bath apartment consisting of two units. It took up most of the top floor in a century-old building with expansive views of the bay, Golden Gate Bridge and nearby Presidio park. They declined to be named.

San Francisco has among the strongest tenant protections in the country, which encourages tenants to hang on to apartments as market prices go up. While California has recently adopted rent control and other tenant protections, San Francisco approved its rent control ordinance back in 1979 as a way to alleviate the city’s housing crisis.

That means landlords can only raise rent on some properties a certain amount each year, with the current increase pegged at under 1%. Landlords cannot evict tenants without just cause, such as nonpayment of rent. Owners who want to move into their own single-family home must pay tenants to vacate. The maximum amount tenants in one unit can receive to relocate is $22,000, with an extra $5,000 for households with minor children or seniors 60 and up.

In this case, relocation costs did not apply; the landlord and renters reached a voluntary agreement for them to leave.

Steven Adair MacDonald, the lawyer who represents the couple, said reaction has been divided to a six-figure buyout that is enough to purchase a home in most parts of the country.

“Landlord attorneys think it’s an outrage, and on the tenant side, everybody’s excited, they think it’s great,” he said.

But MacDonald thinks the landlord is the winner, as he will be able to rent the apartment for $25,000 a month and recoup the buyout amount in just over three years.

“After that, it will be gravy, so it’s a great investment,” said MacDonald.

MacDonald is also suing the landlord, Friedman Properties, on behalf of “fairly well-heeled” tenants in nine other units who have moved out since March, unable to bear the constant noise and dust from ongoing renovations in the Presidio Heights building.

Marty Friedman, listed as the company’s authorized agent, did not respond to a phone call requesting comment.

But his attorney, David Wasserman, said it was inaccurate to say that his client wanted to drive out the tenants. The building needed upgrades that were planned before the pandemic hit, and the landlord felt they couldn’t put off the work, he said.

The Financial Times was first to report the deal.