California accused one of its own cities of blocking the construction of enough affordable places to live, filing a lawsuit Friday that signals an aggressive approach to the state’s housing crisis by the new governor, Gavin Newsom.

Huntington Beach, an upscale coastal city outside Los Angeles, is “standing in the way of affordable housing production and refusing to meet regional housing needs,” according to an announcement from the office of Mr. Newsom, a Democrat elected in November.

The first-of-its-kind lawsuit seeks to require the city to amend its housing plan to enable construction of more units accessible to people of all income levels.

Michael Gates, Huntington Beach’s city attorney, said in an email that the city “has been, in fact, complying with all applicable State housing and zoning laws.” He said delays in making more progress on housing have been caused by other lawsuits and that Huntington Beach “will review all of its options in order to respond to the lawsuit.”

California’s median home price rose 6% in 2018 from the previous year to $570,010, according to the California Association of Realtors. The national median is $259,100, says the National Association of Realtors.