Donald Trump’s love of Twitter is giving his legal team some headaches.

The 9th Circuit Court of Appeals upheld an injunction placed on his so-called travel ban, and specifically referenced a tweet the President shot out in the days following the terror attacks in London that killed eight people and injured nearly 50 more.

“That’s right, we need a TRAVEL BAN for certain DANGEROUS countries,” Mr Trump wrote, “not some politically correct term that won’t help us protect our people!”

As it turns out, the judges on the 9th Circuit Court saw in that tweet a statement that undermines the whole reasoning behind the travel ban.

“Indeed, the President recently confirmed his assessment that it is the 'countries' that are inherently dangerous,” the judges wrote in their opinion, “rather than the 180 million individual nationals of those countries who are barred from entry under the President’s 'travel ban.”

The judges also noted that White House Press Secretary Sean Spicer had himself instructed reporters to view the President’s tweets as official statements from the White House.

New York City bodegas strike to protest Trump's travel ban Show all 27 1 /27 New York City bodegas strike to protest Trump's travel ban New York City bodegas strike to protest Trump's travel ban Ethnic Yemenis and supporters protest against President Donald Trump's executive order temporarily banning immigrants and refugees from seven Muslim-majority countries, including Yemen on February 2, 2017 in the Brooklyn borough of New York City. At least 1,000 Yemeni-owned bodegas and grocery-stores across the city shut down from noon to 8 p.m. today to protest the order. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban Men pray during a protest by ethnic Yemenis and supporters over President Donald Trump's executive order temporarily banning immigrants and refugees from seven Muslim-majority countries, including Yemen on February 2, 2017 in the Brooklyn borough of New York City. At least 1,000 Yemeni-owned bodegas and grocery-stores across the city shut down from noon to 8 p.m. today to protest the order. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban Ethnic Yemenis and supporters protest against President Donald Trump's executive order temporarily banning immigrants and refugees from seven Muslim-majority countries, including Yemen on February 2, 2017 in the Brooklyn borough of New York City. At least 1,000 Yemeni-owned bodegas and grocery-stores across the city shut down from noon to 8 p.m. today to protest the order. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban Men pray during a protest by ethnic Yemenis and supporters over President Donald Trump's executive order temporarily banning immigrants and refugees from seven Muslim-majority countries, including Yemen on February 2, 2017 in the Brooklyn borough of New York City. At least 1,000 Yemeni-owned bodegas and grocery-stores across the city shut down from noon to 8 p.m. today to protest the order. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People gather for evening prayer at a rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban A Yemeni business owner places a sign on the gate of his store February 2, 2017 in the Brooklyn borough of New York City. Across the city, Yemeni owned bodega and grocery-stores will shut down from noon to 8 p.m. to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen. It is expected that over 1000 stores will be closed in protest with workers and owners participating in an afternoon rally in Brooklyn. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban A Yemeni business owner places a sign on the gate of his store February 2, 2017 in the Brooklyn borough of New York City. Across the city, Yemeni owned bodega and grocery-stores will shut down from noon to 8 p.m. to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen. It is expected that over 1000 stores will be closed in protest with workers and owners participating in an afternoon rally in Brooklyn. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban NEW YORK, NY - FEBRUARY 02: Yemeni business owner Musa closes the gate to his store February 2, 2017 in the Brooklyn borough of New York City. Across the city, Yemeni owned bodega and grocery-stores will shut down from noon to 8 p.m. to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen. It is expected that over 1000 stores will be closed in protest with workers and owners participating in an afternoon rally in Brooklyn. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban A Yemeni business owner closes the gate to his store February 2, 2017 in the Brooklyn borough of New York City. Across the city, Yemeni owned bodega and grocery-stores will shut down from noon to 8 p.m. to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen. It is expected that over 1000 stores will be closed in protest with workers and owners participating in an afternoon rally in Brooklyn. Spencer Platt/Getty

Mr Trump’s allies have long been concerned that the President’s tweeting habit will inhibit the West Wing’s ability to move policy forward.

“The point cannot be stressed enough that tweets on legal matters seriously undermine [the Administration’s] agenda and POTUS — and those who support him, as I do, need to reinforce that point and not be shy about it,” George Conway, a lawyer married to White House senior adviser Kellyanne Conway, tweeted earlier this month. “These tweets make some people feel better, but they certainly won’t help [the solicitor general] get five votes in [the Supreme Court], which is what actually matters.”