WASHINGTON — President Trump said on Twitter this weekend that undocumented immigrants were invaders who “must immediately, with no Judges or Court Cases,” be sent home. Mr. Trump’s comments prompted criticism that he wanted the United States to strip immigrants and asylum seekers of due-process rights. He also appeared to ignore the fact that some people who enter the country illegally are already removed from the United States without court hearings.

Here is what you need to know about how due process is applied in cases of illegal immigration:

What is due process?

Generally speaking, the Supreme Court says that due process allows people to exercise the legal rights and court processes afforded to them by American law, and it allows them to contest an action proposed by the government in front of a neutral decision maker, like a judge.

Do undocumented immigrants have a right to due process?

Yes. Courts have consistently held that anyone on United States soil is protected by the Constitution’s right to due process, even if they illegally entered the country, though people generally have greater legal protections inside the country than at the border.

How much process is deemed to be “due” depends on the situation. Courts have upheld that people who entered the United States illegally and were ordered deported have a right to appeal those decisions. But the courts have also essentially said that Congress can decide that more limited procedures are sufficient for noncitizens detained at the border.