Homeownership in much of the Bay Area hit a seven-year low last quarter, according to new Census data released Thursday, suggesting that even though the market has cooled slightly, high prices continue to keep many residents from buying.

In a wide swath of the Bay Area that includes San Francisco, Alameda, Contra Costa, San Mateo and Marin counties, 51.7 percent of residents owned their home during the second quarter of this year — the lowest rate since 2012. That’s down from 56.4 percent a year ago, according to Census Bureau data. But in the South Bay, including Santa Clara and San Benito counties, 51.4 percent of residents owned their homes last quarter, up from 50.2 percent a year ago.

The slump in homeownership in some of the Bay Area, which bucks the national trend, comes as prices remain staggeringly high across the region. Residents who can’t afford to pay a premium end up renting, while many who already own property are cashing out and moving away.

“After several years — six, seven, eight, years of consistent, in some cases double-digit price appreciation — buyers are finally saying, ‘Hey, this is it. We’ve reached my pain point,’” said David Stark, spokesman for the Bay East Association of Realtors.

Homeownership rates are lower in the Bay Area than elsewhere in the state, and in the rest of the country. In California, 53.2 percent of residents owned their homes last quarter, according to the Census Bureau. Nationwide, 64.1 percent of residents were homeowners in the second quarter of this year — a rate that has stayed almost flat since the second quarter of 2018.

After years of record-setting highs, Bay Area home prices have started to inch down. Year-over-year median sale prices for existing homes fell 5.9 percent in Santa Clara County, 3.2 percent in Alameda County and 1.5 percent in San Francisco in May, according to the most recent data available from real estate data firm CoreLogic.

But even after a few months of cooling, prices remain too hot for many buyers. The median sale price in San Mateo County was $1.58 million in May, according to CoreLogic. It was $1.53 million in San Francisco, $1.27 million in Santa Clara County and $912,500 in Alameda County.

As a result, more people — even those making comfortable salaries — are renting instead of buying. In San Jose and San Francisco, the number of renters making more than $150,000 has tripled since 2007, according to a recent survey by Rent Cafe. Those cities now have the highest percentage of wealthy renters in the country.

The trend away from homeownership also has to do with the type of homes that are being built, according to Chris Salviati, a housing economic with Apartment List.

“Throughout the Bay Area, job growth has been outpacing new housing construction for years, and among the new housing that has been built, multi-family rental units are making up an increasing share,” he wrote in an email. “As rental units make up an increasing share of the overall housing stock, the homeownership rate will consequently fall.”

Meanwhile, even residents who want to buy are taking their time about it, Stark said. Homes are sitting on the market longer, racking up fewer offers and selling for less than they did several months to a year ago. In May, sales of existing single-family homes dropped 10 percent year-over-year in San Mateo County, and 6 percent in Santa Clara County, according to CoreLogic.

“For the first time in many years, we’re seeing homes on the market in the 30-day range, where just a year ago it would have been half that time,” said Stark, who attributes the market slump to buyer fatigue.

Even so, homeownership remains the goal for many. Nearly half of renters wish they owned their homes, according to a recent Zillow survey of residents in 20 of the country’s largest metro areas.

“Homeownership is still very desirable in the San Francisco Bay Area,” Stark said. “I think it’s interesting to see these rates go down. But they’re not dropping by 10 percent.”