Bob Woodward’s book Fear: Trump in the White House, and it makes the process behind Donald Trump’s transgender military ban appear very messy.

Based on several anonymous White House sources, Woodward’s book provides insight into the White House’s dysfunctional attempts to effect policy, and the transgender military ban is no exception.

Woodward wrote:

During the campaign, Trump had proclaimed himself a supporter of LGBT rights. Now he told [Brietbart editor and former Trump advisor Steve] Bannon, “What the f**k? They’re coming in here, they’re getting clipped”—a crude reference to gender reassignment surgery. Someone had told him that each surgery cost $250,000, an inflated number. “Not going to happen,” he said.

It goes without saying that “clipped” is not just a “crude” way of describing gender confirmation surgery for trans women, but a very inaccurate way of doing so. Also, not every trans person will undergo such surgery.

Related: Federal court blocks Trump’s transgender military ban

Woodward then describes a conversation on the issue with Chief of Staff Reince Priebus on July 26, 2017. Priebus talked to Trump on the phone, and told him that he had several options for responding to a demand from over 30 conservatives members of Congress that transgender people be banned from serving openly in the military.

One [option] was to retain the Obama policy that allowed transgender people to serve openly, two was to issue a directive to Secretary Mattis giving him leeway, three was a presidential order to end the program but come up with a plan for those transgender people already in the military, and four was to ban all transgender people from military service. The likelihood of being sued increased as they got to number four, Priebus explained. “When you come down, we want to walk you through on paper,” Priebus said.

Before Trump got to the Oval Office, he sent out those infamous tweets announcing the transgender military ban.

Woodward says that Defense Secretary James Mattis objected to the tweets, but Bannon told him to “take one for the team.”

“Mattis announced he would study the issue,” Woodward wrote.

Trump’s transgender military ban is being challenged in four federal courts, and several injunctions against the ban have been imposed.

In March, the Trump Administration issued new guidance and tried to say that it was a new policy, separate from Trump’s tweets and previous guidance. A judge rejected that argument.