President Donald Trump’s top aides tried to pressure U.S. immigration authorities to retaliate against Democratic lawmakers by releasing detained migrants onto the streets of “sanctuary cities” they represent, according to several media outlets.

>> Read more trending news

The idea was suggested in a Nov. 16 email by May Davis, the deputy White House policy coordinator, to officials from the Department of Homeland Security, Immigration and Customs Enforcement and Customs and Border Protection, The New York Times reported.

According to Department of Homeland Security officials, House Speaker Nancy Pelosi's district in San Francisco was among those the White House wanted to target, The Washington Post reported.

In her email, sent with the subject line "Sanctuary City Proposal," Davis proposed that migrants slated to be released into border towns could instead be taken to one of several sanctuary cities, the Times reported.

The White House told ICE the plan was intended to alleviate a shortage of detention space, but also would serve as a message to Democrats, according to the Post. Matthew Albence, the acting deputy director of ICE, opposed the proposal, saying the agency's budget had not been appropriated for that purpose and adding that liability issues would arise if a migrant was injured during transport to the sanctuary city, the Times reported.

Officials also said "there are PR risks as well," according to the Post.

When the White House attempted to push the plan again in February, ICE’s legal department called the idea inappropriate and rejected it, the newspaper reported.

According to CNN, Trump personally pressured then-DHS Secretary Kirstjen Nielsen to execute the plan, but she resisted. The DHS legal team also produced an analysis that scotched the idea.

Nielsen resigned from her post Sunday.