Washington CNN  — 

President Donald Trump is pulling the nomination of Ron Vitiello to lead US Immigration and Customs Enforcement, saying he wants to go in a “tougher direction” – a move that came at the urging of White House senior adviser Stephen Miller.

“We’re going in a little different direction. Ron’s a good man but we’re going in a tougher direction. We want to go in a tougher direction,” Trump told reporters Friday at the White House.

Miller directly lobbied Trump to pull the nomination, two White House officials told CNN.

Miller went to the President and told him that Vitiello, who has led the agency in an acting capacity since last summer, was not fully in favor of closing the southern border, as Trump has threatened to do in recent days.

The move to withdraw the nomination came as a surprise to the Department of Homeland Security and members of Congress, sources familiar with the nomination told CNN. Homeland Security Secretary Kirstjen Nielsen was unaware what was happening until after the nomination had been pulled, a person familiar with the news said.

Vitiello did not come into the office Friday, according to an ICE official. He had been scheduled to travel with Trump on the President’s trip to the US-Mexico border, and was told Thursday he would not be attending.

The White House on Thursday evening informed the Senate it was withdrawing its nomination of Vitiello to lead ICE, according to a letter obtained by CNN.

ICE leadership was under the impression, even Friday morning, that it was a clerical error, according to someone with knowledge of the nomination process. The agency was anticipating a positive outcome in the next couple of weeks.

Trump nominated Vitiello to head the agency in August. He previously served as chief of the US Border Patrol and acting deputy commissioner of Customs and Border Protection.

In a letter sent to agency employees, Vitiello thanked the President, the Senate Homeland Security Committee Chairman Ron Johnson and members of Congress. “No matter the external circumstances, I am grateful knowing you remain engaged and dedicated to the critical work of protecting our communities from the transnational criminal organizations and cross-border crime that threatens our nation,” it reads.

“While I will not become the permanent director of ICE, I look forward to working alongside you in serving the American public with Integrity, Courage, and Excellence.”

Vitiello came under scrutiny during his confirmation process as a result of past controversial social media posts. Democratic Sen. Gary Peters of Michigan asked in the hearing about a 2012 tweet, in which Vitiello “suggested that the Democratic Party should be renamed the ‘liberalcratic party’ or the “Neo-Klanist party.’”

Vitiello acknowledged “it was a mistake” and said “he was trying to make a joke,” adding that he thought it was a direct message.

He also faced criticism from the agency’s union, which accused of him making false statements, and at his hearing in November for refusing to rule out potential future family separations, and was questioned about his personal tweets.

“Never before have we seen so many warning signs with respect to a nominee prior to confirmation and we believe him to be unfit to serve as director,” wrote National ICE Council President Chris Crane in a February letter to Senate committee leadership.

Still, Vitiello appeared on track to be confirmed. Last month, the Senate Homeland Security Committee voted to move the nomination to a floor vote, after two previous delays on his nomination.

Earlier Thursday, the Senate Judiciary Committee held over his nomination at the Democrats’ request.

A source close to the White House noted that the President has just needlessly burned political capital with the Republican senators who were in the process of confirming Vitiello.

“All of this headway that they’ve made on the Senate side has been completely negated. There are gonna be a number of members on Senate side who are just gonna be beyond pissed off,” the source said. “We just burned a ton of political capital.”

Trump’s sudden reversal comes against the backdrop of an increase in apprehensions. CBP Commissioner Kevin McAleenan said late last month that the US was on pace to encounter more than 100,000 migrants in March alone, making it “the highest month since 2008.”

CBP has been releasing migrants along the southwest border due to detention facilities hitting capacity. ICE has also had to shift resources to assist with the influx.

The agency has redirected “countless” resources and personnel in response to the “explosion at the border,” said Nathalie Asher, ICE acting executive associate director for enforcement and removal operations in March.

“Our interior arrests have been affected because I’ve had to redirect to the priority, as a nation in addressing what has been occurring and continues to occur at an alarming rate at the border,” she added.

Vitiello is scheduled to testify on ICE before the House Appropriations Homeland Security subcommittee next Wednesday.

He recently joined Nielsen on a trip to McAllen, Texas, to meet with sheriffs for a roundtable discussion on border security and strengthening federal-local partnerships.

Trump has not named any potential nominees for the ICE post.

CNN’s Allie Malloy contributed to this report.