President Donald Trump on Thursday said he would order border agents to refuse to consider the asylum claims of people apprehended while crossing the border between ports of entry — though immigration lawyers asserted the move runs afoul of U.S. and international law.

Trump made the announcement after a wave of falsehoods, many of them racially charged, about what he again called an “invasion” of Central American migrants and asylum seekers currently traveling toward the U.S. border.

“Migrants seeking asylum will have to present themselves lawfully at a port of entry,” Trump said.

Immigration lawyers and experts pounced on the comments:

Barring asylum to people who cross between ports would violate the law. Asylum is available to all, even those who don't cross at ports of entry. Not to mention, CBP has been blocking people from applying at ports of entry! That's why we sued to stop their illegal practice. — Aaron Reichlin-Melnick (@ReichlinMelnick) November 1, 2018

POTUS implying that he's going to end the right to seek asylum for those who enter in places other than ports of entry. That will require a change in the law, not a presidential speech. — Elizabeth Goitein (@LizaGoitein) November 1, 2018

The Immigration and Nationality Act states: “Any alien who is physically present in the United States or who arrives in the United States (whether or not at a designated port of arrival and including an alien who is brought to the United States after having been interdicted in international or United States waters), irrespective of such alien’s status, may apply for asylum in accordance with this section or, where applicable, section 235(b).”

The Trump administration is being sued for turning away asylum seekers from ports of entry.

The Department of Homeland Security’s Office of Inspector General said in an October report that they “saw evidence that limiting the volume of asylum-seekers entering at ports of entry leads some aliens who would otherwise seek legal entry into the United States to cross the border illegally.”

The President promised a vague “executive order sometime next week” to include “everything — it’ll be quite comprehensive. Many of the things we’ve talked about today.”

Trump’s half-hour remarks were chock-full of off-base claims about his own record on immigration, and about former President Barack Obama’s.

At one point, he falsely said his administration’s family separation policy — which split up thousands of children from their families after their apprehension at the border, and as a result of which some families still have not been reunited — was a continuation of Obama’s actions.

“President Obama separated the children from their parents and nobody complained,” he said. “When we continued the exact same law, this country went crazy.”

Obama separated families in instances where the child was considered to be in danger, for example, or when parentage claims were in doubt. Trump, for several months, systematically separated every family apprehended at the border.

Trump claimed asylum seekers “never show up for their trials” (they do). He said separately that “3 percent” of asylum seekers show up for court dates. In reality, the vast majority of asylum seekers as well as undocumented immigrants show up for court dates, according to a study by the American Immigration Council.

This post has been updated.