The immigration debate needs a dose of history. For example, in the 1920s 650,000 Mexican workers came legally, causing the number of Mexicans in the United States to rocket to 750,000 in 1929, from 100,000 in 1900.

Everything you know about immigration, particularly unauthorized immigration, is wrong.

So says Princeton University's Doug Massey, anyway. Massey is one of the nation's pre-eminent immigration scholars. And he thinks we've wasted a whole lot of money on immigration policy and are about to waste a whole lot more.

Massey slices the history of Mexico-to-U.S. migration into five periods. Early in the 20th century, there was the era of "the hook," when Japan stopped sending workers to the United States and the mining, agriculture and railroad industries begged Mexican laborers to replace them. It's called "the hook" because laborers were recruited with promises of high wages, signing bonuses, transportation and lodging, most of which either never materialized or were deducted from their paychecks.

Then, during the Roaring Twenties, came the "flood tide" — almost 650,000 Mexican workers came legally, causing the number of Mexicans in the United States to rocket to almost 750,000 in 1929, from 100,000 in 1900.

The Great Depression ended all that. Jobless Americans took out their anger on jobless Mexicans and thus began the "era of deportations." From 1929 to 1939, 469,000 Mexicans were expelled from the country; by 1940, the Mexican-born population had fallen to 377,000.

Enter World War II. With so many American men fighting overseas, Mexican labor was once again in high demand. The United States and Mexico negotiated the Bracero Program, which gave Mexican workers access to temporary U.S. visas. That kicked off the "Bracero era." In 1945, the program brought in 50,000 Mexican guest workers. By 1956, it was up to 445,000. Mexico was also freed from quota limitations on legal immigration, so by 1963, more than 50,000 Mexicans were immigrating each year. With so many legal ways to enter the country, illegal immigration was virtually unknown.

In 1965, the United States ended the Bracero Program and began to limit Mexican immigration. The number of guest-worker permits dropped to 1,725 in 1979, from more than 400,000 in 1959. The number of residence visas declined to 20,000 after previously being unlimited. But the demand for Mexican labor remained strong. And so the "era of undocumented migration" began. Border apprehensions rose to 1.7 million in 1986, from 55,000 in 1965. But even as millions of Mexicans entered the country illegally, millions also returned to Mexico. About 85 percent of new entries were offset by departures. Consequently, the growth of the undocumented population was slow.

After passage of a comprehensive immigration law in 1986, the United States began militarizing the border with Mexico even as the General Agreement on Tariffs and Trade and, later, the North American Free Trade Agreement strengthened economic ties with Mexico. From 1986 to 2000, trade with Mexico increased eightfold.

Until this point, there isn't much to dispute in Massey's narrative. But here his immigration story takes a turn that confounds Washington's conventional wisdom and makes a mockery of the current political debate.

According to Massey, the rise of America's large undocumented population is a direct result of the militarization of the border. While undocumented workers once traveled back and forth from Mexico with relative ease, after the border was garrisoned, immigrants from Mexico crossed the border and stayed.

"Migrants quite rationally responded to the increased costs and risks by minimizing the number of times they crossed the border," Massey wrote in his 2007 paper "Understanding America's Immigration 'Crisis.' "

"But they achieved this goal not by remaining in Mexico and abandoning their intention to migrate to the U.S., but by hunkering down and staying once they had run the gantlet at the border and made it to their final destination."

The data support Massey's thesis: In 1980, 46 percent of undocumented Mexican migrants returned to Mexico within 12 months. By 2007, that was down to 7 percent. As a result, the permanent undocumented population exploded.

The militarization also had another unintended consequence: It dispersed the undocumented population. Before 1986, about 85 percent of Mexicans who entered the United States settled in California, Texas or Illinois, and more than two-thirds entered through either the San Diego-Tijuana entry point or the El Paso-Juarez entry point. As the United States blockaded those areas, undocumented migrants found new ways in — and new places to settle. By 2002, two-thirds of undocumented migrants were entering at a non-San Diego/El Paso entry point and settling in a "nontraditional" state.

In recent years, the net inflow of new undocumented immigrants arriving from Mexico has fallen to zero. Some of the decline is due to the U.S. recession and a falloff in construction, which employed a lot of migrant workers. But some is due to an improving economy in Mexico, where unemployment is 5 percent and wages have been rising. "I personally think the huge boom in Mexican immigration is over," Massey said.

Yet the political debate over immigration is stuck in 1985. Congress is focused above all on how to further militarize an already-militarized border — despite the fact that doubling the size of the Border Patrol since 2004 and installing hundreds of miles of barriers and surveillance equipment appear to have been counterproductive. At any rate, the flow of unauthorized immigration has slowed dramatically. "Listening to the Republicans, you'd think waves of people are crossing the border," Massey said. "But illegal migration stopped four years ago and has been zero since."

In light of these facts, the debate is backward. House Republicans are focused on further militarizing the border against the people who are no longer crossing it; at the same time, they are loath to do anything about the millions of real undocumented immigrants who are the legacy of the last buildup. At best, we can hope to waste tens of billions of dollars on further enforcement in return for a lengthy and complicated path to citizenship. At worst, we'll do nothing — in which case this will be known as the era of wasted opportunity.

There is a reason why the air in Tampa Bay is filled with playoff talk. If Thursday night's 12-8 Bucs preseason win over the Jaguars is any indication, it's also going to be filled with footballs thrown by quarterback Jameis Winston.