If cities want assistance as part of the Justice Department’s new initiative to curb violent crime, they will have to help federal authorities tamp down on illegal immigration, Attorney General Jeff Sessions announced Thursday.

In a statement, the Justice Department said that cities can be selected for the Public Safety Partnership — which sends federal experts to work on crime-fighting efforts with their local counterparts — only if the cities “show a commitment to reducing crime stemming from illegal immigration.” The department sent a letter to four places that it said had expressed interest in the program, and asked them to confirm they had policies that would help the Department of Homeland Security detain and deport undocumented immigrants arrested for other crimes.

The letters, sent to top police officials in Baltimore, Albuquerque, Stockton and San Bernardino, asked for confirmation that the jurisdictions would honor Homeland Security requests to detain foreigners for up to 48 hours beyond their scheduled released time. The Justice Department also asked cities to give 48 hours notice to Homeland Security about the scheduled release times of illegal immigrants and allow Homeland Security personnel to access detention facilities to question suspected illegal immigrants. The departments were told to respond by Aug. 18.

Sessions said in a statement that “sanctuary cities,” which employ policies that, in his view, hinder enforcement of immigration laws, and “make all of us less safe.”

“By forcing police to go into more dangerous situations to rearrest the same criminals, these policies endanger law enforcement officers more than anyone,” Sessions said. “The Department of Justice is committed to supporting our law enforcement at every level, and that’s why we’re asking ‘sanctuary’ jurisdictions to stop making their jobs harder. By taking simple, common-sense considerations into account, we are encouraging every jurisdiction in this country to cooperate with federal law enforcement. That’s what 80 percent of the American people want them to do, and that will ultimately make all of us safer — especially law enforcement on our streets.”

Representatives of the Baltimore and Albuquerque police departments noted that they do not control the jails — the state or county does. Baltimore Police Commissioner Kevin Davis also said in a statement that other jurisdictions seemed to have been chosen for the federal initiative “without a formal selection process,” and if there was such a process, Baltimore remained unaware of it — except that ” federal immigration enforcement criteria appears to be a primary consideration.”

“Baltimore is a welcoming city. We do not enforce federal immigration laws. We do not ask people questions about their immigration status. We do, however, enforce the criminal laws of the State of Maryland and honor criminal arrest warrants obtained by federal law enforcement agencies,” Davis said in the statement.

All four members of Congress who represent Baltimore issued a scathing joint statement about the letter Thursday, calling the threat to city funding “unconscionable” and promising to “respond forcefully” with a letter of their own to Sessions.

“The Justice Department recognizes the higher-than-average crime rates in Baltimore and the need for intensive assistance to help reduce violent crime,” they said. “Rather than threatening Baltimore and other cities, the Justice Department should be eager to bring to bear all of the federal government’s resources to reduce violent crime.”

The lawmakers, all Democrats, included Sens. Benjamin L. Cardin and Chris Van Hollen, and Reps. Elijah E. Cummings, Dutch Ruppersberger and John Sarbanes.

Many police departments have bristled at involving themselves in immigration enforcement, asserting it is ineffective at reducing violent crime and can deter immigrant communities from cooperating with detectives investigating more violent incidents.

The Public Safety Partnership, which Sessions announced in June, was an outgrowth of President Trump’s executive order directing a crackdown on violent crime. It was supposed to provide selected cities with federal expertise — though not money — to help curb violence.

“Turning back the recent troubling increase in violent crime in our country is a top priority of the Department of Justice and the Trump Administration, as we work to fulfill the President’s promise to make America safe again,” Sessions said in a statement announcing the program.

The 12 cities initially selected to be a part of the program were Baton Rouge; Birmingham, Ala.; Buffalo; Cincinnati; Houston; Indianapolis; Jackson, Tenn.; Kansas City, Mo.; Lansing, Mich.; Memphis; Springfield, Ill.; and Toledo. A department spokesman said at the time, though, that more would likely be added later in the year. Baltimore and Chicago, two large cities where violent crime is increasing, were notably not on the first list.

Sessions and Trump had previously threatened to strip federal funding from sanctuary cities, though a federal judge has largely curtailed their ability to do so.

Josh Hicks contributed to this report.

Read more