President Donald Trump said he would pardon the top border official if he were to get arrested for breaking federal law by denying asylum-seekers entry into the U.S., according to CNN .

BREAKING: In Calexico, CA last week, where POTUS told border agents to block asylum-seekers from entering the US contrary to law, Trump told CBP head McAleenan if he were sent to jail as a result, the president would pardon him, 2 Sr admin officials tell me. More on @CNN ...

During his trip to the border at Calexico, California, last week, Trump told the head of Customs and Border Protection, Kevin McAleenan, that if he were sent to jail as a result of blocking immigrants from entering the country, the president would grant him a pardon, two senior administration officials told CNN.

McAleenan is now the acting secretary of the Department of Homeland Security.

During the visit, Trump told McAleenan that he wanted to close the border, prompting his pardon comment, The New York Times reported.

Under U.S. law, immigrants who say they fear returning to their native country may be eligible to seek asylum here. But the Trump administration has attempted to deter asylum-seekers from coming to the U.S., urging them to stay in Mexico or another country instead, and in some cases delayed them from requesting safety at all. Homeland Security implemented “metering” at ports of entry, limiting the number of people who could approach them to ask for asylum each day, and began a new program ― now blocked by a federal court ― to send individuals who had requested asylum back to Mexico to await their court proceedings.

CBP referred questions to DHS, which denied the report.

“At no time has the President indicated, asked, directed or pressured the Acting Secretary to do anything illegal,” DHS said in a statement to CNN. “Nor would the Acting Secretary take actions that are not in accordance with our responsibility to enforce the law.”

Elise Foley contributed to this report.