President Trump made it clear again on Friday morning following the subway attack in London that he's angry about what his ill-fated travel ban has become. But much of the ban's struggles can be directly traced back to the president himself. For three reasons in particular:

1. Its chaotic implementation

Demonstrators gather near the White House in January to protest Trump's travel ban. (Zach Gibson/Getty Images)

When Trump took office, The Fix's Aaron Blake pointed out that polls showed about half of Americans were open to the idea of a temporary ban on immigration from terror-prone countries. But Trump's broad, confusing and not clearly communicated travel ban immediately made a lot of enemies and not many friends.

The first travel ban originally appeared to ban people with green cards and students who needed to get back to school in the United States.

As ACLU lawyers and potential Democratic 2020 contenders sprinted to the airports to protest the unfairness of it all, Trump's own Cabinet was still trying to figure out what was in the ban and how to enforce it. John F. Kelly, then the head of the Homeland Security department, whose agency would be enforcing the ban, found out the president had officially signed it by watching TV, the New York Times reported. Republicans in Congress weren't sure what to make of it or how to defend it. Just five Republican senators were on record clearly supporting the ban.

Adding to the divisiveness within the Trump administration and out, it soon became clear the driving policymaker behind the ban was not a policymaker at all but a political strategist, the now-ousted Stephen K. Bannon.

2. Trump's tweets completely undermined the legal argument for it

The battle over the ban shifted from airports to the courts as Democratic attorneys general sued, and federal district judges blocked it before it ever got started.

And then Trump started tweeting. As a new, toned-down ban the administration issued in March made its way through courtrooms, too, Trump somehow managed to undermine his administration's entire legal argument for the ban in just one morning.

He called into question courts' judgment and authority, which Trump's own Supreme Court pick said was troublesome. Doing so seemed unhelpful considering the goal was to have judges to rule in his favor.

He used the word “ban,” despite the fact that his White House aides were all over television saying it wasn't a ban. Also, the word “ban” was used by his campaign and associates immediately following the word “Muslim,” which kicked open the door for opponents to argue this amounted to unconstitutional religious discrimination.

Trump also demanded a tougher ban, which completely ignores the fact that even his White House tacitly acknowledged the first version went too far.

A week later, a federal appeals court decided to pause Trump's travel ban in part because of one of those tweets. Trump, the judges argued, appeared to suggest the ban was necessary to block all citizens of certain countries, not just potentially dangerous people in them.

3. The White House's timeline kept contradicting itself

Trump's travel ban was always supposed to be temporary; a pause on the vetting process from six majority-Muslim countries while U.S. security officials could come up with a more sustainable, safer system.

The original ban was supposed to have expired months before the Supreme Court finally got to look at it in the summer. And Trump officials did not yet have a more permanent solution.

In June, the Supreme Court allowed some of Trump's travel ban to go into effect, excepting people with “bona fide” connections to the United States. It agreed to hear arguments in the fall whether the ban, at its core, is legal.

When the court hears the case Oct. 10, the portion of the ban that was supposed to last for just 90 days will expire nine months later, without ever fully going into effect.

All this raises the question, said The Post's Darla Cameron and Kim Soffen: Why was the Trump administration still urging the Supreme Court to reinstate its travel ban, if it (and its purpose) would have expired by now?

Trump will have to decide in the next few weeks whether to issue a more permanent ban or just drop this whole thing, report The Post's Matt Zapotosky and John Wagner. A new ban could start a whole other legal challenge. If that happens, the president's approach to the ban these past nine months provide a pretty good road map of what not to do.