Outgoing Homeland Security Secretary Kirstjen Nielsen made her first comments to the media Monday after resigning her post over the weekend, saying she shares President Trump’s goal of securing the border.

From outside her home in Alexandria, Va., on Monday, Nielsen thanked the president for allowing her to serve in his administration.

NIELSEN RESIGNS AS DHS SECRETARY AFTER WHITE HOUSE MEETING WITH TRUMP

“I am forever grateful,” Nielsen said, praising Homeland Security officials who work to “execute their missions and to protect the homeland.”

“I’m looking forward to supporting them from the outside,” Nielsen said, noting that since her Sunday afternoon resignation, she has spoken with administration officials and lawmakers on Capitol Hill to ensure a smooth transition during her exit.

“I share the president’s goal of securing the border,” Nielsen said. She did not take any questions from the media.

The president announced Nielsen’s would “be leaving her position” after 16 months on the job on Sunday evening. Nielsen took over leadership of the Department of Homeland Security after Trump appointed former DHS Secretary John Kelly to be White House chief of staff. Kelly has since resigned from that post.

Trump also announced that U.S. Customs and Border Protection (CBP) Commissioner Kevin McAleenan would replace Nielsen as acting secretary, tweeting: “I have confidence that Kevin will do a great job!”

Later, Nielsen tweeted that she had submitted her resignation.

“Its[sic] been an honor of a lifetime to serve with the brave men and women of @DHSgov. I could not be prouder of and more humbled by their service, dedication, and commitment to keep our country safe from all threats and hazards,” she tweeted with an image of the resignation letter.

The letter, addressed to the president, said: “Despite our progress in reforming homeland security for a new age, I have determined that it is the right time for me to step aside.”

She later tweeted that she was “eternally grateful and proud” of the work of “the brave and dedicated men and women” of DHS.

Nielsen’s resignation came after a meeting with the president at the White House on Sunday, amid an ongoing influx of migrants at the U.S.-Mexico border. The Associated Press reported that Nielsen had been frustrated with the difficulty of getting other departments to help to deal with the growing number of families crossing the border.

Administration officials told Fox News on Sunday that Nielsen’s background in cybersecurity made her a poor fit to handle border issues, while McAleenan best fits Trump’s requirement of being the “toughest cop” on the frontier.

Sources told Fox News that Nielsen had been viewed as resistant to some of the immigration measures pushed by the president and his aides, specifically related to protected status for some refugees and policies at the border.

A senior administration official told Fox News that National Security Adviser John Bolton long felt that Nielsen was not the right person for the job and opposed her policy of using United Nations organizations to try to stem the flow of illegal migrants. The official added that Bolton and Kelly had a heated disagreement over Nielsen’s approach during an October 2018 policy meeting, after which Bolton went to Trump to protest what Nielsen was doing.

KEVIN MCALEENAN, NEW ACTING DHS BOSS, HAS LONG RECORD IN BORDER SECURITY

Once Kelly left the White House at the end of last year, Nielsen's days appeared to be numbered. She had expected to be pushed out last November, but her exit never materialized. And during the government shutdown over Trump's push for funding for a border wall, Nielsen's stock inside the White House even appeared to rise.

Trump nominated McAleenan as CBP commissioner on the first day of his presidency, but McAleenan was not confirmed by the Senate until March of 2018. He was appointed CBP deputy commissioner in November 2014 by President Barack Obama.

Sources tell Fox News that it remains to be seen whether McAleenan can handle the political duties required to be permanent homeland security secretary, though they noted that he has excellent relationships with the Pentagon, State Department, and National Security Council. McAleenan also has a reputation within CBP as a "brilliant" mind with "tremendous organizational skills."

Nielsen's departure is the latest staffing shakeup in the department, which was founded to combat terrorism after the Sept. 11, 2001 terror attacks.

On Friday, Trump confirmed he had withdrawn the nomination of acting Immigration and Customs Enforcement (ICE) Director Ron Vitiello to become the permanent head of the agency, telling reporters that "Ron’s a good man, but we’re going in a tougher direction, we want to go in a tougher direction." Administration sources tell Fox News that the withdrawal of Vitiello's nomination was the first step in Trump's plan to control the border crisis.

The second step was asking for Nielsen's resignation.

Fox News' John Roberts and The Associated Press contributed to this report.