White House staffers and guests will no longer be able to use their personal cellphones in the West Wing, the Trump administration said Thursday.

The announcement came just a day after details from a forthcoming book about the inner-workings of the Trump administration emerged — a development that enraged President Donald Trump and prompted him to threaten legal action against Steve Bannon, the former strategist who is quoted widely in the book.

In a statement Thursday, White House Press Secretary Sarah Huckabee Sanders said, "The security and integrity of the technology systems at the White House is a top priority for the Trump administration."

"Therefore, starting next week the use of all personal devices for both guests and staff will no longer be allowed in the West Wing," she said. "Staff will be able to conduct business on their government-issued devices and continue working hard on behalf of the American people."

Press Secretary Sarah Sanders declined to answer NBC News' question whether the new White House personal cell phone ban will apply to Trump's personal devices. "As always we do not discuss specific security measures around the president," she said.

The White House had been weighing the move as early as November, Bloomberg News reported, amid anger from Trump about leaks to the media within his administration. Officials told Bloomberg in November that the ban was being considered due to cybersecurity concerns.

The ban announcement followed the release of excerpts from "Fire and Fury: Inside the Trump White House," by Michael Wolff, that revealed widespread dysfunction and infighting inside the administration.

NBC News obtained a copy of the book on Wednesday. NBC News has not confirmed much of the book.

The work features riveting behind-the-scenes anecdotes from Trump's White House, including Bannon calling a meeting of Trump campaign officials with a Russian lawyer in Trump Tower during the presidential campaign "treasonous" and "unpatriotic."

Later Wednesday, an attorney for Trump threatened Bannon with legal action, accusing him of violating written confidentiality and nondisparagement agreements by talking to Wolff for the book.