Melania Trump got her wish when the Trump administration said Wednesday that Deputy National Security Adviser Mira Ricardel was leaving the White House a day after the first lady called for Ricardel to be fired.

"Mira Ricardel will continue to support the president as she departs the White House to transition to a new role within the administration," White House Press Secretary Sarah Sanders said Wednesday. "The president is grateful for Ms. Ricardel's continued service to the American people and her steadfast pursuit of his national security priorities."

Ricardel's next assignment wasn't immediately announced.

NBC News reported Wednesday that President Donald Trump has clashed repeatedly with National Security Adviser John Bolton and Ricardel, his deputy. Ricardel had specifically butted heads with Mrs. Trump and her staff, notably over plans to include her on the first lady's trip to Africa in October.

A White House official said Tuesday that White House Chief of Staff John Kelly intervened to smooth over the issues. But Mrs. Trump's staff has often complained about what it has characterized as Kelly's dismissive attitude toward her team, NBC News reported Tuesday.

Referring to Ricardel, Stephanie Grisham, the first lady's communications director, said Tuesday that "it is the position of the Office of the First Lady that she no longer deserves the honor of serving in this White House."

The public demand by a first lady that her husband fire one of his staff members was extraordinary and perhaps unprecedented in U.S. history.

Ricardel was among Bolton's first hires when he became national security adviser in March. She previously worked for him during the administration of former President George W. Bush.

But her position had been tenuous for several days, with a White House official telling NBC News that she was "not long for this world" after a series of clashes with the first lady’s office and with officials in the West Wing, including Kelly.

Four sources said Tuesday that Bolton only recently learned that Kelly had quietly mounted an effort to oust Ricardel. He was described as being "furious."