President Donald Trump visits a new section of the border wall with Mexico in Calexico, Calif., Friday April 5, 2019. (AP Photo/Jacquelyn Martin)
PHOTO: 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
Now playing
02:11
'Sad': Kinzinger blasts Hawley's CPAC remarks
New York Gov. Andrew Cuomo speaks during a news conference at a COVID-19 vaccination site in the Brooklyn borough of New York, Monday, Feb. 22, 2021. (AP Photo/Seth Wenig, Pool)
PHOTO: Seth Wenig/Pool/AP
New York Gov. Andrew Cuomo speaks during a news conference at a COVID-19 vaccination site in the Brooklyn borough of New York, Monday, Feb. 22, 2021. (AP Photo/Seth Wenig, Pool)
Now playing
01:12
Gov. Andrew Cuomo responds to allegations of sexual harassment
 Psaki biden White House Khashoggi Saudi Arabia sotu bash vpx _00011629.png
PHOTO: CNN
Psaki biden White House Khashoggi Saudi Arabia sotu bash vpx _00011629.png
Now playing
03:42
Bash to Psaki: Why hasn't Saudi Arabia been held accountable for murder of Khashoggi?
Speaker of the Virginia House of Delegates Eileen Filler-Corn (D-Fairfax) speaks during opening ceremonies of the 2020 Virginia General Assembly at the Virginia State Capitol on January 8, 2020 in Richmond, Virginia.
PHOTO: Zach Gibson/Getty Images
Speaker of the Virginia House of Delegates Eileen Filler-Corn (D-Fairfax) speaks during opening ceremonies of the 2020 Virginia General Assembly at the Virginia State Capitol on January 8, 2020 in Richmond, Virginia.
Now playing
04:26
Virginia's political shift from red to purple to blue
senator bill cassidy sotu bash vpx _00002611.png
senator bill cassidy sotu bash vpx _00002611.png
Now playing
01:42
GOP senator: If we continue to idolize one person, we will lose
Now playing
01:27
Kristi Noem gets standing ovation for Dr. Fauci dig at CPAC
House Speaker Nancy Pelosi
PHOTO: House TV
House Speaker Nancy Pelosi
Now playing
02:52
House passes Biden's $1.9 trillion Covid-19 relief package
covid-19 relief package house biden sot malveaux nr vpx _00000000.png
PHOTO: CNN
covid-19 relief package house biden sot malveaux nr vpx _00000000.png
Now playing
02:28
CNN's Joe Johns explains Biden's short speech as relief bill heads to Senate
Sen. Bernie Sanders AC360 intv 02262021
PHOTO: CNN via Cisco Webex
Sen. Bernie Sanders AC360 intv 02262021
Now playing
03:54
Sanders on what happens with proposed minimum wage increase now
WASHINGTON, DC - JANUARY 17: The U.S. Capitol dome is seen beyond a security fence on January 17, 2021 in Washington, DC. After last week
PHOTO: Michael M. Santiago/Getty Images
WASHINGTON, DC - JANUARY 17: The U.S. Capitol dome is seen beyond a security fence on January 17, 2021 in Washington, DC. After last week's riots at the U.S. Capitol Building, the FBI has warned of additional threats in the nation's capital and in all 50 states. According to reports, as many as 25,000 National Guard soldiers will be guarding the city as preparations are made for the inauguration of Joe Biden as the 46th U.S. President. (Photo by Michael M. Santiago/Getty Images)
Now playing
02:33
This is what's in the $1.9 trillion coronavirus package
PHOTO: CNN
Now playing
02:24
Acosta corrects CPAC organizer: Trump did lose the election
PHOTO: Pool
Now playing
01:10
Rand Paul accused of 'transphobic attack' in confirmation hearing
PHOTO: CNN
Now playing
02:39
Republicans push new restrictive election bills in 43 states
van jones minimum wage
van jones minimum wage
Now playing
02:44
Van Jones: This is a make or break issue for Democrats
US President Joe Biden speaks about the 50 million doses of the Covid-19 vaccine shot administered in the US during an event commemorating the milestone in the Eisenhower Executive Office Building in Washington, DC, February 25, 2021. (Photo by SAUL LOEB / AFP) (Photo by SAUL LOEB/AFP via Getty Images)
PHOTO: Saul Loeb/AFP/etty Images
US President Joe Biden speaks about the 50 million doses of the Covid-19 vaccine shot administered in the US during an event commemorating the milestone in the Eisenhower Executive Office Building in Washington, DC, February 25, 2021. (Photo by SAUL LOEB / AFP) (Photo by SAUL LOEB/AFP via Getty Images)
Now playing
02:28
Axelrod explains the message Biden is sending with strike
(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.