Los Angeles (CNN) -- The Los Angeles County Sheriff's Department is being investigated for alleged "systemic" civil rights violations during routine traffic stops by trying to identify people who live in publicly subsidized housing, federal officials said Friday.

The U.S. Justice Department is conducting a civil investigation into the alleged discriminatory policing by the sheriff's deputies in the cities of Lancaster and Palmdale, both in the Mojave Desert's Antelope Valley, federal officials said.

Deputies from sheriff stations in those two communities also allegedly conducted warrantless searches of African-American families' homes under the auspices of a housing authority compliance inspection, and housing authority investigators based at the two stations allegedly accompanied deputies during the compliance checks, federal officials said.

Sometimes, the deputies allegedly approached the home of a recipient of what is known as Section 8 subsidies "with guns drawn and in full SWAT armor," conducted searches and asked questions unrelated to housing programs, Justice Department officials said.

The Justice Department inquiry will focus on whether the two sheriff stations "engaged in a pattern or practice of discrimination on the basis of race or national origin," federal officials said.

"In interviews with affected individuals and community representatives, we heard troubling accounts of allegedly unjustified stops and searches," Assistant Attorney General Thomas E. Perez said in a statement.

"We will be investigating whether there is a pattern of racially motivated stops and arrests," Perez said. "We intend to peel the onion to its core, and gain a precise understanding of what is happening in these two areas."

Sheriff Leroy D. Baca appeared at the news conference Friday with Perez in downtown Los Angeles and said his department is cooperating with the investigation.

"We are not going to enforce the laws on the backs of the poor who are in effect obeying the law," the sheriff said.

The Antelope Valley has experienced explosive population growth over the past two decades, and African-Americans and Latinos now make up almost 60 percent of Lancaster and almost 70 percent of Palmdale, Perez said.

Justice Department officials will also look at whether leaders in the two communities "adopted a policy or practice designed to drive certain residents out of the community," Perez said.

The cities of Lancaster and Palmdale don't have their own police forces, and they contract with the sheriff, Perez said. Federal authorities will investigate allegations of deputies working alongside city officials, Perez said.

Palmdale City Hall was closed Friday, and officials there and in the city of Lancaster couldn't be reached immediately for comment.

The sheriff stations in those communities show disproportionately high rates of misdemeanor and obstruction arrests in comparison with other stations, federal officials said. Also, the two cities have "unusually high rates of misdemeanor arrests and particularly high rates of arrests of African-Americans," Perez said.

The federal inquiry is being carried out under a police reform provision enacted in the wake of the Los Angeles police beating of Rodney King in 1991, and the Justice Department now has the authority to investigate "patterns or practices of the deprivation of constitutional rights or violations of federal law," Perez said.

In a recent e-mailed letter to the sheriff, Perez wrote that the Justice Department will conduct its inquiry in conjunction with another ongoing investigation begun in June into allegations that the cities of Palmdale and Lancaster violated the Fair Housing Act.

The Los Angeles County Housing Authority is also being investigated for an alleged "systematic effort to discriminate against African-Americans and Latinos," federal officials said.

"We've been working with (Justice Department investigators) cooperatively since we were notified on June 16," said Emilio Salas, deputy executive director of the Los Angeles County Housing Authority.

His agency looks forward to the inquiry and any recommendations that the Justice Department may come up with, he said.