LAFAYETTE — A group of Bay Area residents has filed a legal challenge against the city of Lafayette asking a judge to block 44 luxury single-family homes and replace them with 315 moderate-income apartments.

Oakland resident Sonja Trauss filed the suit Tuesday in Contra Costa Superior Court. Trauss, along with the San Francisco Bay Area Renters Federation, is fighting the city”s recent approval of the Homes at Deer Hill project, which the O”Brien Land Company wants to build on a hillside at the corner of Pleasant Hill and Deer Valley roads. She wants the city to rescind approval of the million-dollar homes and issue permits for the 315 apartments known as the Terraces of Lafayette.

SFBARF”s suit comes nearly four months after the city approved the high-end home project, which includes several public amenities such as an all-weather sports field, a dog park and a new parking lot.

It also follows a legal challenge by the group Save Lafayette, which submitted a referendum petition to the city with more than 2,300 signatures of residents who are asking officials to either rescind approval of the homes, or let voters decide.