Kirstjen Nielsen resigned Sunday from her post as secretary of the Department of Homeland Security, President Donald Trump announced in a post on Twitter.

>> Read more trending news

The announcement came after the pair met at the White House on Sunday afternoon. Nielsen said in a tweet late Sunday that she plans to stay on in her position until Wednesday.

“Its been an honor of a lifetime to serve with the brave men and women of (the Department of Homeland Security),” Nielsen wrote. “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.”

>> Jamie Dupree: Secretary of Homeland Security resigns as Trump presses on immigration

An unidentified source told CNN that Nielsen didn't plan to resign Sunday, however, she faced mounting pressure to step down as Trump returned his spotlight to issues at the U.S.-Mexico border. Tensions between the White House and Nielsen have persisted almost from the moment she became secretary in 2017. Nielsen was viewed as resistant to some of the harshest immigration measures supported by the president and his aides, particularly senior adviser Stephen Miller, both on matters around the border and others like protected status for some refugees.

She traveled with the president Friday to the southern border, where Trump has been trying to get a wall built amid pushback from Democrats and activists.

Citing unidentified sources, The Associated Press reported Nielsen felt growing frustration over what she perceived to be "a lack of support from other departments and increased meddling by Trump aides on difficult immigration issues."

She became the face in 2018 of the Trump administration’s zero-tolerance immigration policy, which officials used to justify the separations of thousands of children from their parents at the southern border. Trump was initially pleased with her response to criticism of the approach, particularly when she stated that the administration had no family separation policy.

However, Trump reversed course amid mounting condemnation and Nielsen was instrumental in ending the policy.

Months before her resignation, rumors swirled that Nielsen would be pushed out of the administration as the president railed against her handling of border security and questioned her loyalty in heated meetings at the White House, CNN reported in November. Nielsen previously served in President George W. Bush's administration.

Trump nominated Nielsen to serve as his Homeland Security secretary in October 2017. She took office in December of that year, replacing acting secretary Elaine Duke.

Nielsen served as John Kelly's chief of staff while he was working as Trump’s Homeland Security secretary, a post he took on after former Republican National Committee chairman Reince Priebus stepped down.

When Trump tapped Kelly to serve as his own chief of staff, Nielsen followed. She was quickly named principal deputy.

Kelly left the White House in early January.

Trump announced Sunday that U.S. Customs and Border Protection Commissioner Kevin McAleenan will serve as acting DHS secretary in the wake of Nielsen’s resignation.

McAleenan has served as CBP commissioner since May 2017. During the uproar over family separations at the border in 2018, McAleenan told The New York Times Magazine that Trump's attempt to halt the separations with an executive order served as an "important recalibration."

Nielsen’s resignation follows the president’s recent threats to shut down the southern border, which he walked back last week, saying he’d give Mexico a year to help prevent the flow of Central American migrants to the U.S.

Homeland Security Secretary Kirstjen Nielsen listens as U.S. President Donald Trump speaks during a meeting with FEMA Administrator Brock Longin the Oval Office September 11, 2018 in Washington, DC.

Credit: Win McNamee

icon to expand image

Credit: Win McNamee

The Associated Press contributed to this report.