Top White House aides set up a “wall” to shield President Biden from unscripted events and long interviews amid fears of the president’s testiness and habit of mangling statements, according to a new book.

“Peril” by Bob Woodward and Robert Costa cited a number of incidents from the gaffe-prone president in the early days of his administration, including a back-and-forth with a CNN reporter for which he later apologized.

OBAMA TOLD TRUMP: ‘I CAN’T THINK OF ANYTHING’ WHEN ASKED WHAT HIS BIGGEST MISTAKE WAS, BOOK CLAIMS

“That side of Biden — his tendency to at times be testy or mangle statements — was still with him and now part of his presidency,” the book says.

In turn, a number of Biden aides told the reporters that Chief of Staff Ronald Klain and then-White House advisor Anita Dunn worked to prevent such incidents by keeping him away from “unscripted events or long interviews.”

“They called the effect ‘the wall,’ a cocooning of the president,” they wrote.

MILLEY DESCRIBED GEORGE FLOYD RIOTS AS ‘PENNY PACKET PROTESTS,’ BOOK CLAIMS 
 

However, the authors note that those incidents still kept appearing, despite that protective bubble.

LLOYD AUSTIN SAYS HE HAS ‘CONFIDENCE’ IN GEN. MILLEY AMID CHINA CONTROVERSY

The book says that the White House had to go into damage control mode after Biden announced he had struck a major bipartisan infrastructure deal, but then said it was contingent on a more liberal spending package being passed. 

It reportedly surprised Democrats, who saw them as separate, and angered Republicans who were unhappy about the caveat. It led to officials working the phones to repair the damage, and Biden issuing a lengthy statement to clarify his position.

CLICK HERE TO GET THE FOX NEWS APP

The book contains a number of revelations, in particular its reporting about how General Mark Milley was in communication with the Chinese to reassure them about fears of an attack during the chaos surrounding the Jan. 6 Capitol riot.

The White House did not immediately respond to Fox News’ request for comment.