Indonesia is no place for a gay man like V.S., whose survival in his Muslim-majority homeland meant a vigilantly closeted existence.  When he visited Philadelphia in 2001, he intended to return home after the six months allowed by his tourist visa were up. But in the city's vibrant Gayborhood, he found acceptance for the first time in his life.

"I didn't expect to stay. I just wanted to see what was going on here," said V.S., now 45, who spoke on condition of anonymity to avoid repercussions.

He remained here after his visa expired, taking his place among the growing ranks of "overstays," whose numbers every year since 2007 have far exceeded those of immigrants who crossed U.S. borders illegally. Today, various studies show, overstays are the leading source of unlawful immigration, and make up more than 40 percent of the nation's approximately 11 million undocumented immigrants.

A Department of Homeland Security "entry/exit" report released late last month showed that nearly 629,000 people who came to the United States on a visa in fiscal year 2016 stayed after it expired, and were still here at the end of the year.

The latest research undercuts President Trump's often-repeated claim that "a big, beautiful wall," at a cost of $20 billion to $40 billion, is the answer to illegal immigration.

"No dollar spent on a border wall will stop someone from overstaying a visa," said Philadelphia lawyer William Stock, a former national president of the American Immigration Lawyers Association. A wall, however huge, he said, won't stop anyone with the means to buy an airplane ticket and the connections to obtain a visa, if one is needed for visitors from that country.

To get one, a prospective visitor has to be interviewed at a U.S. embassy or consulate overseas and produce evidence of ties to the native country that seem sufficient to tug him or her back home. How difficult the process is depends on the country of origin and the traveler's credibility at the interview.

The percentage of overstays varies widely from state to state. Pennsylvania ties (with Connecticut) for third highest, at 67 percent overstays among the state's estimated 158,000 undocumented immigrants. New Jersey, at 63 percent, ranks sixth, with 286,000 overstays among its 452,000 illegal immigrants. By contrast, the undocumented populations in Kansas, Arkansas, and New Mexico consist of fewer than 25 percent overstays.

Jon Landau, a former Philadelphia chapter chairman of the American Immigration Lawyers Association, said overstays make up about 25 percent of his practice. Pennsylvania has a relatively high percentage of them, he theorized, because its immigrant population includes many people from Eastern Europe, South America, Asia, and the former Soviet Union — people with the money to buy a ticket, and incentives to overstay when they find they can make a better living here. "They are not just from the terribly poor countries that you can think of," he said.

In a statement released with the Homeland Security report, U.S. Customs and Border Protection said it would expand its use of facial-recognition software and fingerprint scans to scrutinize the approximately 50 million travelers who enter the U.S. annually.

Currently, border officers interview arriving travelers to determine why they came. They collect biographic information such as names and addresses, fingerprints, and digital photographs, which are biometrically matched against data previously provided to the U.S. with the visa application. For departing travelers, air and sea carriers must provide biographic manifest data that border agents can match against the arrival data to determine who left on time and who overstayed. Anyone guilty of overstaying six months or more is barred for three years from re-entering the U.S.; overstay a year or more and it's a 10-year ban.

Hunting them all down, however, would be next to impossible.

While overstays are less than 2 percent of all visitors, their growing significance in the debate about illegal immigration is becoming better known, said demographer Robert Warren of the Center for Migration for Studies, a New York think tank that bills itself as promoting "understanding between immigrants and receiving communities."

Warren's research, contained in "The 2,000 Mile Wall in Search of a Purpose," a 2017 article he coauthored for the Journal on Migration and Human Security, found that two-thirds of the foreign-born who entered in 2014 and later became undocumented were overstays.

Such findings suggest that a singular focus on constructing a southern border wall is insufficient without a plan to keep better track of the people who enter legally and refuse to leave.

One such person is Gabriella, a native of El Salvador. She came on a six-month visa in 2008, with the secret intention of never returning to the gang-infested land where her parents' grocery-distribution business was repeatedly robbed at gunpoint.

Two years earlier, her parents had used a tourist visa to enter the U.S. and eventually settled in Montgomery County. Gabriella, 23, a law firm receptionist, married a U.S. citizen last year, which changed her status to legal resident. Her parents, who share her last name, are still undocumented, which is why she did not want to be identified. While her parents contemplated making an asylum claim, she said, they feared a loss in immigration court would mean deportation to a place where their lives were in danger.

Overstaying, even while risking arrest, seemed a safer option.

As for V.S., he was snared in the legal system around 2002, when noncitizens from majority-Muslim countries were required to register with the U.S. government after the 9/11 attack. His overstay was discovered; he faced removal, and lost a bid for asylum.

Years later, with the help of a new lawyer, John Vandenberg, V.S. was able to reopen his case, and won asylum based on new evidence in a State Department report that homophobia in Indonesia had intensified.

He works in a restaurant now, and lives in South Philadelphia with his husband. "Married to the person I love," he said, in a union inconceivable in his homeland.