President Trump said Friday that longtime Department of Homeland Security (DHS) official Chad Wolf would be the new acting head of Homeland Security, the fifth person to hold the job in Trump's administration.

Trump casually announced the appointment in response to a reporter's question as he departed the White House for a campaign rally in Mississippi: “He’s acting, and we’ll see what happens,” he said, not confirming whether Wolf would be nominated for the job permanently.

White House spokesman Hogan Gidley later clarified that the current acting DHS secretary, Kevin McAleenan, would remain on the job until Veterans Day, Nov. 11.

"As the president has said, Kevin McAleenan has done a tremendous job," Gidley told reporters. "He'll be leaving after Veterans' Day and after he departs, Chad Wolf will serve as acting secretary in the interim."

Wolf, a onetime chief of staff to former DHS Secretary Kirstjen Nielsen, has been involved with the 240,000-person department off and on since its creation following the Sept. 11, 2001, terrorist attacks. He left the role as Nielsen's chief of staff to take on another role within Homeland Security before she resigned in April.

CURVEBALLS IN RACE FOR DHS SECRETARY, AS IMMIGRATION HAWKS FACE BARRIERS

In February, Trump nominated Wolf to be the department's first under secretary of the department's Office of Strategy, Policy and Plans. That nomination has not been yet confirmed by the Senate.

Trump has struggled to find a replacement for McAleenan, whose last day was supposed to be Oct. 31. Federal vacancy rules placing restrictions on who can fill the position had been thought to bar immigration hardliner Ken Cuccinelli, currently the acting head of U.S. Citizenship and Immigration Services, and Mark Morgan, the current acting commissioner of U.S. Customs and Border Protection, from taking the job.

CLICK HERE FOR THE FOX NEWS APP

The Federal Vacancies Reform Act of 1998 stipulates that candidates who succeed an acting DHS chief must have Senate approval, have worked under the previous secretary or are the next in line of succession.

The New York Times reports that the White House has been exploring a possible loophole under which Trump's top pick could be made the assistant secretary of the Countering Weapons of Mass Destruction Office and then bumped up to DHS a short time later, a risky strategy sure to face legal pushback from Congress.

Wolf is also expected to face an uphill battle receiving confirmation from the Senate because of his similar stances on immigration to his former supervisor Nielsen.

The Associated Press and Fox News' Adam Shaw contributed to this report.