This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

The Trump administration pressured the Department of Homeland Security to release immigrants detained at the southern border into so-called sanctuary cities in part to retaliate against Democrats who oppose President Donald Trump’s plans for a border wall, a source familiar with the discussions told CNN on Thursday.

Trump personally pushed Homeland Security Secretary Kirstjen Nielsen to follow through on the plan, the source said. Nielsen resisted and the DHS legal team eventually produced an analysis that killed the plan, which was first reported by The Washington Post.

The San Francisco district represented by Nancy Pelosi was among the Democratic strongholds the White House singled out for the plan, according to the Post.

White House senior adviser Stephen Miller urged senior DHS officials to make the plan a reality, the source said. The plan finally died after Miller and other White House officials pushed it in February, according to the source.

Miller was angered that DHS lawyers refused to produce legal guidance that would make the plan viable, saying the proposal would likely be illegal.

DHS officials believe that the legal standoff is one reason why Miller has pushed for the firing of John Mitnick, the general counsel for DHS, who is still with the department.

Nielsen left DHS this week after she was forced to resign.

“Sanctuary city” is a broad term applied to jurisdictions that have policies in place designed to limit cooperation with or involvement in federal immigration enforcement actions. Cities, counties and some states have a range of informal policies as well as laws that qualify as “sanctuary” positions.

Most of the policies center on not cooperating with federal law enforcement on immigration policies. Many of the largest cities in the country have forms of such policies.

Trump has amplified his rhetoric on illegal immigration in recent weeks, threatening to close the southern border if Congress and Mexico don’t take action.