Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — President Donald Trump Wednesday tapped Kirstjen Nielsen, Gen. John Kelly’s longtime aide, as his pick to be the next Department of Homeland Security Secretary.

Nielsen went to work at the White House in September, after Trump named Kelly, then DHS Secretary, as his chief of staff. The president made the announcement in a statement Wednesday afternoon and her nomination now goes to the Senate for confirmation.

Nielsen, 45, served as Kelly’s chief of staff at the Department of Homeland Security at the start of the administration and was a key player in the rollout of the president’s immigration crackdown and travel ban.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The officials said that the selection of Nielsen comes as Kelly works to bring order to an administration that has been fraught with controversy and mixed messages since Trump was inaugurated. They spoke on the condition of anonymity since the decision has not been formally announced.

"She has Kelly's full faith and confidence," the congressional source said.

The decision to select Kelly’s successor as secretary of Homeland Security took months, in part because the administration had trouble finding someone who was conservative enough on immigration but who could also get confirmed, the congressional source said. But Nielsen will likely be viewed in the same way as Kelly, a general who followed orders, because the two work so closely together.

House Homeland Security Committee Chairman Mike McCaul was also considered for the position, but was told in recent weeks he was no longer on the short list, the congressional source said.

Kirstjen Nielsen, Chief of Staff of U.S. Department of Homeland Security, center, walks to Air Force One as she departs on Aug. 22, 2017, at Andrews Air Force Base, Maryland. President Donald Trump is en route to Arizona and Nevada. Alex Brandon / AP file

Acting Homeland Security Secretary Elaine Duke had been rumored to be on the short list, but questions have been raised about Duke's performance since stepping into the role after Kelly’s departure, according to one White House official, who noted she "ruffled some feathers."

The Department of Homeland Security was formed in response to the Sept. 11, 2001, attacks to bring multiple agencies under one roof. Running the department, which includes the countries largest law enforcement agency, U.S. Customs and Border Protection, takes strong managerial skills, former DHS officials have said.

Nielsen previously worked as a member of the Resilience Task Force of the Center for Cyber & Homeland Security think tank. She is a graduate of the Georgetown School of Foreign Service and holds a law degree from the University of Virginia.