President Donald Trump has always linked illegal immigration to the southern border and the need for a wall. On Thursday — the 13th day of a government shutdown tied to the issue — Mr. Trump tweeted a video called "crisis on the border" depicting rioting migrants trying to rush into the country.

But only one-third of the recent undocumented immigrant population came to the United States through the southern border, according to the Center for Migration Studies (CMS), a New York City-based think tank. The rest came legally on work visas and stayed after they expired, according to CMS.

In other words, a wall wouldn't have kept them out.

According to CMS, about 42 percent of the 10.7 million undocumented immigrants living in the U.S. in 2014 — the most recent year for which data was available — were doing so on expired visas. As the southern border has hardened, that number is estimated to have risen to over half, Randy Capps, director of research for U.S. Programs at the Migration Policy Institute, said.

"The fight over a border wall is a typical issue of 'fighting the last war': ten years ago was the fight against Mexican migration to the U.S.," Capps said in a telephone interview with CBS News. "The problem isn't Mexican migration anymore. Now the immigration problem is overstayers, not border crossers."

The undocumented immigrant population hit a 12-year low in 2016, the most recent year for which data is available, almost entirely due to a sharp drop in unauthorized border crossings by Mexican nationals, according to the Pew Research Center. Pew estimated that the unauthorized Mexican immigrant population decreased by 22 percent since its peak in 2007.

Over a five-year period ending 2016, a little over half a million Mexicans illegally entered the U.S. through the southern border. That was down from 2.05 million during five years ending 2007, according to Pew.

While there has been an increase in Central American migrants arriving at the southern border recently, a vast majority have claimed asylum, a legal mode of immigration, said Capps.

Mr. Trump has made immigration, specifically a border wall, a signature piece of his administration's priorities. While there have been some measures to rein in visa overstays since Mr. Trump was sworn into office, the changes have been less resource-draining.

One such change is that Immigration Customs and Enforcement now emails visa holders to warn them that their legal residency is about to expire, said Jessica Vaughan, Director of Policy Studies at the Center for Immigration Studies, a research group that supports policy which "admits fewer immigrants."

"It'll make people think twice about staying," Vaughan said in a telephone interview with CBS News. "I think it'll help."

In the year ending September 30, 2017, the most recent year for which data is available, about 700,000 foreigners were living in the U.S. on visas that had expired in the prior 12 months, according to data from the Department of Homeland Security. The agency estimated that about 15 percent of those have since left the country, but the rest remain in the U.S. as undocumented immigrants. 2017 was only the second year that DHS reported the overstay figure.

Like most other immigration data points, pinpointing the total undocumented population and how they arrived in the U.S. is equal parts art and science, Vaughan said. Using deportation data from ICE, which tracks how immigrants arrive in the U.S., Vaughan estimates that visa overstays comprise somewhere between 40 and 50 percent of the undocumented immigration population.

"Both modes of entry are a big problem," said Vaughan.