Airbnb crime doesn’t pay.

That’s the message San Francisco wants to send after a well-heeled couple who turned 14 city apartments into illegal hotels through the vacation-rental service agreed to a $2.25 million settlement.

Darren and Valerie Lee agreed to pay that amount for penalties and investigation costs. In addition, they are barred for at least seven years from offering short-term rentals in any of the 17 San Francisco buildings they own or manage. The couple had to pledge their real estate as collateral to make sure they pay the fine and comply with the injunction, which was approved Monday in San Francisco Superior Court.

“The serious financial penalty is an important deterrent,” City Attorney Dennis Herrera said in a statement. “It sends a clear message to those looking to illegally profit off of San Francisco’s housing crisis: Don’t try it. We will catch you.”

In a lengthy email, Valerie Lee wrote that the couple felt like they had been martyrs for many others who offered vacation rentals. She said she and her husband appreciated the process of working with Herrera’s office on a settlement, which “helped us understand the city’s need for affordable housing at a much more in depth level.”

The couple settled because they didn’t want to waste their or the city’s time and resources by arguing about vacation rentals’ impact on affordable housing, she said, and now want to focus on ways to help solve that crisis.

Airbnb critics have long charged that illicit hotels are widespread in the city, gobbling precious housing stock, although the Lees’ case appears to be an outlier.

“These are not the type of hosts we want on our platform and are glad the city has the tools it needs to enforce the rules,” Airbnb said in a statement.

San Francisco’s housing crisis spurred stricter enforcement of its vacation rental laws, which took effect early this year, and Airbnb now enforces a “one host, one home” policy in the city, which largely prohibits hosts with multiple listings.

A Chronicle investigation found that listings on vacation-rental sites plunged by more than half once the regulations went into effect.

Starting a year ago, Airbnb and rival HomeAway, faced with a judge’s order, began to enforce San Francisco’s requirement that all vacation-rental listings register with the city, which checks to ensure that hosts live in the rentals and caps entire-unit rentals at 90 days a year.

If the Lees’ behavior occurred on Airbnb today, the company would be on the hook for steep fines and criminal charges. However, when the Lees were renting to tourists, San Francisco had not yet implemented penalties for companies that arrange illicit vacation rentals.

San Francisco actually caught the Lees twice. In 2014 the couple evicted tenants under the Ellis Act to convert a property into short-term rentals. The Lees settled that case for $276,000 and agreed to an injunction against further vacation rentals in their 17 properties, which collectively have more than 45 units.

However, Herrera’s office said, the Lees violated the injunction thousands of times, racking up more than $900,000 in short-term rentals in just the first 11 months after it was in place. Their take was about $700,000.

When inspectors came calling, the Lees took what the city called “far-reaching, devious” steps to portray the apartments as being legitimately rented to long-term tenants: enlisting friends, family and associates to pretend that they inhabited the units; drawing up fake leases; and staging the units to appear lived in.

The Lees weren’t exactly criminal masterminds, however. The apartments all had identical staging, which the city described: “They had the same Costco food items scattered about, the same arrangement of dirty breakfast dishes in every kitchen sink, same personal products in each bathroom, same damp towels artfully draped over doors as though someone had recently showered, the same collection of shoes and clothes in closets, and the same houseplants in each apartment.”

In addition, they used the same IP address to create Airbnb host accounts for 13 of the listings.

The 14 properties were in scattered neighborhoods, including Pacific Heights, Nob Hill, the Mission and North of the Panhandle.

Many were upscale, with prices quoted on Airbnb of $250 to $500 a night. One Pacific Heights listing for an “exquisitely renovated home” rented for $395 to $595 a night, with a three-night minimum, according to Herrera’s 2014 complaint.

Carolyn Said is a San Francisco Chronicle staff writer. Email: csaid@sfchronicle.com Twitter: @csaid