To forgo a repeat of last year, when labor shortages triggered an estimated $140 million in agricultural losses, as crops rotted in the fields, officials in Georgia are now dispatching prisoners to the state’s farms to help harvest fruit and vegetables.

The labor shortages, which also have affected the hotel and restaurant industries, are a consequence of Georgia’s immigration enforcement law, HB 87, which was passed last year. As State Rep. Matt Ramsey, one of the bill’s authors, said at the time, “Our goal is ... to eliminate incentives for illegal aliens to cross into our state.”

Now he and others are learning: Be careful what you wish for, because you may get more than you bargained for.

Georgia’s law, similar to those in Alabama, Arizona and a few other states, gives police the authority to demand immigration documentation from suspects when they detain them for other possible violations. The law also makes it more difficult for businesses to hire workers and creates harsher punishments for those who employ or harbor illegal immigrants.

The Pew Hispanic Center estimated that some 425,000 illegal immigrants lived in Georgia when the legislation was passed—seventh highest in the nation. Those numbers are now down, as hoped for, but the state’s economy is paying a heavy price.

The dirty secret that everybody knew was that most of the state’s agricultural workers were immigrants, many of them illegal. Some lived in the state; others migrated with the harvest from southern Florida up to New York and back. Some of the former have moved away, while many of the latter are bypassing Georgia. Without them, according to a University of Georgia study, farmers were about 40 percent short of the number of workers they needed to harvest last year’s crop.

Despite high unemployment in the state, most Georgians don’t want such back-breaking jobs, nor do they have the necessary skills. According to Dick Minor, president of the Georgia Fruit and Vegetable Grower’s Association, immigrants “are pretty much professional harvesters” with many specializing in particular crops.

Workers are paid by volume, with skilled workers typically earning $15 to $20 an hour. Unskilled workers earn much less, which is why most locals don’t want the jobs.

Georgia’s experience is consistent with economic research on immigration. Although many Americans believe immigrants “steal” our jobs and push down our wages, economists find little evidence of that.

Since 1950 the U.S. labor force has roughly doubled in size, but there has been no long-run increase in unemployment. Most economic studies also find little evidence that increased immigration depresses the wages of U.S. workers. At worst, it might push down the wages of high school dropouts, but even there the effect is small.

Simple supply and demand analysis would seem to indicate if you increase the supply of labor, wages will decline. But immigrants don’t simply increase the supply of labor. They supply skills that most Americans don’t have. As such, they don’t replace American workers so much as free them up to do other, typically more-skilled, things. This symbiotic relationship benefits immigrants and native-born alike.

Georgia’s immigration law has had precisely the effect the economic studies could have predicted. Farmers are having a hard time finding workers with the right skills to harvest their crops. As a result, Minor says, “A lot of the smaller growers have elected not to plant as many crops or to plant any crops.” These reductions cascade through the state economy and everybody loses.

Georgia’s immigration law wasn’t motivated solely by economic concerns, of course. Many Georgians also had concerns about the high cost of providing public services to illegal residents: schooling, medical care, law enforcement and other publicly funded services.

But there are better ways to handle such problems than by chasing away needed workers.

Georgia’s immigration law is a blunt instrument that is doing unnecessary harm to immigrants and native Georgians alike, making everyone poorer. Both Georgia, and any other state that’s considering a similar law, should reconsider.