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.