The U.S. Department of Housing and Urban Development has opened an investigation into whether San Francisco’s housing policies violate federal nondiscrimination laws.

The agency’s probe appears broad in scope, but according to documents obtained by The Chronicle, the investigation will focus on policies around affordable housing development.

But in a letter sent to Mayor London Breed and several city departments Thursday, a HUD official said the agency wanted to find out whether any of San Francisco’s procedures for approving and permitting multifamily developments are contributing to the city’s affordable housing crisis.

“Among other things, the investigation will examine whether San Francisco’s current practices impose artificial, arbitrary, and unnecessary impediments to fair housing choice by limiting affordable housing development that provides access to opportunities for” people protected by federal nondiscrimination laws, Anna Maria Farias, HUD’s assistant secretary for fair housing and equal opportunity, said in the letter.

The federal Fair Housing Act, meant to combat residential segregation, prohibits discrimination on the basis of race, color, national origin, sex or disability.

Jeff Cretan, a spokesman for the mayor’s office, confirmed the receipt of the letter and that city departments and attorneys are reviewing it.

HUD has requested copies of city laws related to housing development, a summary of permit applications for multifamily housing construction in San Francisco over the past 10 years and copies of any housing-related studies by any city department over the past 10 years.

A HUD spokesman said the agency does not comment on investigations.

Sam Moss, executive director of the Mission Housing Development Corp., an affordable housing developer, speculated that the probe may be in response to San Francisco’s neighborhood preference program.

Created in 2015, the program requires 40 percent of units in new affordable housing developments funded by the city and private sources to be reserved for people living in the supervisor’s district where the projects are built or within a half mile of them.

Breed has long championed the program as critical for protecting people in close-knit neighborhoods from being uprooted and broken up by gentrification and soaring housing costs. This spring, the city reported that the program was working as intended.

But HUD has long looked down on it, viewing it as a vestige of racist housing policies and in violation of the federal Fair Housing Act.

“It’s important to remember that HUD’s determination not to prosecute the city’s use of neighborhood preference was approved by the Obama administration, and the Trump administration has made it very clear it’s looking to roll back most of Obama’s initiatives,” Moss said.

Regardless of the outcome of the investigation, it is onerous to build affordable housing in San Francisco. It takes an average of five years to complete an affordable housing project and at a cost of about $700,000 per unit.

Dominic Fracassa is a San Francisco Chronicle staff writer. Email: dfracassa@sfchronicle.com Twitter: @dominicfracassa