Mexicans are the largest group of immigrants living in the U.S. They've been under pressure since President Donald Trump called for construction of a wall between the U.S. and Mexico and said Mexico wasn't sending its "best people." So why don't Mexicans and other immigrants just get in line for their green cards so they can later apply for citizenship?

Well, it’s not that easy. Six reasons why:

You need a green card. And they’re hard to get.

Immigrants must qualify for a green card, which allows them to live and work in the U.S. legally. Permanent residency is usually obtained because an employer needs the immigrant to work a particular job, or because the immigrant has a close relative living in the U.S. The immigrant must show he or she won't become a public charge of the government, must pass a medical exam and, in many cases, get a sponsor who will attest to accepting financial responsibility for the immigrant.

But it can take years and, in the case of Mexicans, even decades.

Why does it take so long?

A backlog is built into the system: About 1 million green cards are issued each year, but there are limits in some categories. There are no limits on immediate family — spouses and unmarried sons and daughters younger than 21 and parents of U.S. citizens 21 or older. The largest number of green cards is given to immediate relatives.

But the federal immigration act provides for an annual limit of 226,000 slots for immigrants under family-sponsored categories where no immediate relative is applying: For example, brothers and sisters of adult U.S. citizens. It also calls for an annual limit of 140,000 under the employment-based categories. That's further complicated by limits on the number of people who can come from each country. One can also get a humanitarian visa, or a diversity visa. All in all, about 1 million people get residency each year.

What countries have the longest wait times?

Wait times vary based on how a person might qualify for a green card. For example, as of this month, it takes at least 22 years for people from Mexico to get a green card if they’re the married son or daughter of a U.S. citizen.

The four countries with the longest wait times for family and for employer-sponsored permanent visas are Mexico, India, China and the Philippines. So the line is very long.

The State Department publishes a monthly bulletin updating applicants on the earliest month and year of the green card applications that are being reviewed.

Why so long for Mexicans?

Mexico is the U.S.'s largest source of immigrants — both lawfully and unlawfully here. They made up about 28 percent of all immigrants in 2014, according to the Pew Research Center. Because Mexico is our neighbor and has so many immigrants with deep ties to the U.S., there are many more Mexicans waiting for green cards. Right now, about 1.3 million Mexicans are waiting to learn whether they can get family-sponsored green cards, according to a federal government report. And that's just those living outside the U.S.

This is how far behind they are: The State Department is now processing visas for the Mexican married sons or daughters of U.S. citizens who have been waiting in line since May 1995. It's slightly worse for Filipinos who have visa dates of March 1995 for the same family relationship.

Another example: A brother or sister from Mexico of an adult U.S. citizen would have to be waiting in line since October 1997. But because fewer are applying from India and the caps for India are different, a brother or sister from India would have to be waiting in line since November 2003.

Can an unauthorized immigrant already living in the U.S. apply for legal permanent residency?

It depends, says Dan Kowalski, an immigration attorney and the editor of Bender's Immigration Bulletin. Immigrants can apply for a waiver for the fact they are already here unlawfully, if they have a qualifying relative or another way to apply, Kowalski said. But getting such waivers is difficult, he said.

Are there efforts afoot to limit legal immigration?

Legal immigration is in the limelight now as Congress considers legislation that would cut in half the number of green cards awarded each year. The biggest target are those green cards that reunify family members who are non-immediate relatives, Kowalski said.