President Donald Trump visits a new section of the border wall with Mexico in Calexico, Calif., Friday April 5, 2019. (AP Photo/Jacquelyn Martin)
Jacquelyn Martin/AP
President Donald Trump visits a new section of the border wall with Mexico in Calexico, Calif., Friday April 5, 2019. (AP Photo/Jacquelyn Martin)
Now playing
03:02
Trump told CBP head he'd pardon him if sent to jail
Getty Images/CNN
Now playing
01:31
Ocasio-Cortez 'inclined' to agree that Justice Breyer should retire
Now playing
02:50
'Beyond belief': Pelosi on Trump's DOJ saying they were unaware of data breach
Now playing
02:47
Pelosi: Manchin left door ajar on HR1 and I'm not giving up
WASHINGTON, DC - JULY 28:  Attorney General William Barr appears before the House Oversight Committee In his first congressional testimony in more than a year, Barr is expected to face questions from the committee about his deployment of federal law enforcement agents to Portland, Oregon, and other cities in response to Black Lives Matter protests; his role in using federal agents to violently clear protesters from Lafayette Square near the White House last month before a photo opportunity for President Donald Trump in front of a church; his intervention in court cases involving Trump's allies Roger Stone and Michael Flynn; and other issues. on July 28, 2020 on Capitol Hill in Washington D.C. (Photo by Matt McClain-Pool/Getty Images)
Matt McClain/Pool/Getty Images
WASHINGTON, DC - JULY 28: Attorney General William Barr appears before the House Oversight Committee In his first congressional testimony in more than a year, Barr is expected to face questions from the committee about his deployment of federal law enforcement agents to Portland, Oregon, and other cities in response to Black Lives Matter protests; his role in using federal agents to violently clear protesters from Lafayette Square near the White House last month before a photo opportunity for President Donald Trump in front of a church; his intervention in court cases involving Trump's allies Roger Stone and Michael Flynn; and other issues. on July 28, 2020 on Capitol Hill in Washington D.C. (Photo by Matt McClain-Pool/Getty Images)
Now playing
03:33
Legal analyst: Normally, Barr would have known about subpoenas
CNN
Now playing
02:02
Barr's answer draws scrutiny amid new scandal
CNN
Now playing
03:32
Watergate journalist: Trump's actions go further than Nixon's
raffensberger
CNN
raffensberger
Now playing
03:25
'This is unacceptable': Election official speaks out after threats against wife
Deep State Dogs
Now playing
03:29
See how internet sleuths are hunting down insurrectionists
Vladimir Putin NBC intv
NBC
Vladimir Putin NBC intv
Now playing
04:22
Hear how Putin compared Donald Trump to Joe Biden
Georgia Secretary of State Brad Raffensperger speaks during a news conference on Wednesday, November 11, 2020, in Atlanta.
Brynn Anderson/AP
Georgia Secretary of State Brad Raffensperger speaks during a news conference on Wednesday, November 11, 2020, in Atlanta.
Now playing
02:35
Family of GA secretary of state got death threats months after election
Pennsylvania State House
Now playing
02:04
Pennsylvania lawmaker to GOP: 'Are you not 100% White?'
CNN
Now playing
01:28
'Fishing expedition': Honig slams Trump's DOJ
Getty Images/AP
Now playing
02:08
Trump runs into a problem in revenge quest against GOP governor
CNN
Now playing
02:32
Schiff reacts to DOJ subpoena: Shocked ... but not surprised
CNN
Now playing
04:38
Democratic lawmaker: Trump 'weaponized' DOJ against opponents
Washington CNN —  

President Donald Trump told Customs and Border Protection Commissioner Kevin McAleenan he would grant McAleenan a pardon if he were sent to jail for having border agents block asylum seekers from entering the US in defiance of US law, senior administration officials tell CNN.

Trump reportedly made the comment during a visit to the border at Calexico, California, a week ago. It was not clear if the comment was a joke.

Two officials briefed on the exchange say the President told McAleenan, since named the acting secretary of the Department of Homeland Security, that he “would pardon him if he ever went to jail for denying US entry to migrants,” as one of the officials paraphrased.

The White House referred CNN to the Department of Homeland Security. A DHS spokesman told CNN, “At no time has the President indicated, asked, directed or pressured the Acting Secretary to do anything illegal. Nor would the Acting Secretary take actions that are not in accordance with our responsibility to enforce the law.”

Trump denied reports he offered pardons in a tweet late Friday night.

The exchange came amid threats by the President to close the border in response to a steep uptick of migrants at the border. In March, there were approximately 92,000 arrests of undocumented migrants for illegal entry on the southern border, up from 37,390 last March, according to CBP.

During his visit to Calexico last Friday, Trump said on camera: “We’re full, our system’s full, our country’s full – can’t come in! Our country is full, what can you do? We can’t handle any more, our country is full. Can’t come in, I’m sorry. It’s very simple.”

Behind the scenes, two sources told CNN, the President told border agents to not let migrants in. Tell them we don’t have the capacity, he said. If judges give you trouble, say, “Sorry, judge, I can’t do it. We don’t have the room.”

RELATED: Trump pushed to close El Paso border, told admin officials to resume family separations and agents not to admit migrants

After the President left the room, agents sought further advice from their leaders, who told them they were not giving them that direction and if they did what the President said they would take on personal liability. You have to follow the law, they were told.

Trump has grown frustrated by the number of migrants apprehended at the southern border, placing blame on Democrats and the nation’s immigration laws. On Friday, the President said he’s considering releasing immigrants into so-called sanctuary cities in part to retaliate against Democrats, undercutting earlier denials from his own administration officials.

“Due to the fact that Democrats are unwilling to change our very dangerous immigration laws, we are indeed, as reported, giving strong considerations to placing Illegal Immigrants in Sanctuary Cities only,” Trump said on Twitter. “The Radical Left always seems to have an Open Borders, Open Arms policy – so this should make them very happy!”

Yet the White House received legal guidance months ago that such a policy would run afoul of the law, open the administration to lawsuits, and ultimately undermine the President’s desire to deport undocumented immigrants.

In February, according to documents obtained by CNN, the general counsel for the Department of Homeland Security, John Mitnick, told the White House in writing that such a move could only be done if there was a “strong, mission-related rationale” pertaining to the responsibilities of the department.

CNN’s Priscilla Alvarez contributed to this report.