The U.S. State Department announced this week that it had made a mistake in awarding 22,000 immigrant visas to winners of an annual visa lottery, and that the lottery would in fact have to be done over again. In fact, the whole visa lottery system should be scrapped because it's discriminatory, because it's susceptible to fraud, and because it's stupid.

The so-called diversity visa lottery was created in 1990 at the behest of Senator Ted Kennedy, the chairman of the Senate Judiciary Committee which oversees U.S. immigration law. Senator Kennedy had a problem in Massachusetts of a large number of illegal immigrants from Ireland whom he wanted to legalize. But how to do that given that they lacked the family connections or job skills required under the regular legal immigration system?

The solution was a visa give-away, or lottery. But how to insure that the Irish illegal immigrants would win the lottery? Let's first disqualify all the countries with the largest numbers of would-be immigrants who might otherwise enter the lottery. So let's disqualify Mexico. No Mexicans need apply. Let's disqualify China, India, Haiti, the Dominican Republic, and the Philippines. None of their nationals can apply either.

Then let's skew the lottery against those remaining countries with the largest numbers of otherwise qualifying immigrants, giving them the smallest number of lottery winners. The resulting formula gives the largest number of lottery winners to those countries with the smallest numbers of qualifying immigrants, like Ireland, in the name of "diversity".

And finally, to insure that lottery visas end up in the hands of Irish people, let's specify that thousands of lottery visas in the first few years can be awarded only to citizens of Ireland and nobody else. That should do it.

And so the illegal Irish immigrants of Massachusetts all got diversity visas, and the problem of illegal immigration from Ireland disappeared (though it has recently recurred as a result of the economic crisis). But the diversity visa lottery lives on, awarding 50,000 prized immigrant visas on a discriminatory basis every year in an on-line lottery run by the U.S. Department of State.

Is it constitutional to discriminate against immigrants on the basis of nationality? Apparently it is constitutionally O.K. to disqualify Mexicans, Chinese, Indians, Haitians, Dominicans, and Filipinos, among others because the Supreme Court ruled in 1889 that federal power to regulate immigration pre-dates the U.S. Constitution, and is therefore not subject to constitutional standards or requirements. But that doesn't make it good policy or fair policy.

The visa lottery conducted now electronically through on-line application is highly susceptible to fraud with applicants applying multiple times with slight variations in name and identity, transferring winning entries among themselves, and using the now high-quality counterfeit documents to claim visas. I testified to a Congressional subcommittee against the visa lottery back in 2004, primarily on the basis of its discrimination. But other panelists who testified with me addressed the widespread problem of fraud in the visa lottery.

The diversity visa lottery was conceived for narrow political reasons, is discriminatory, and prone to fraud. It should be abolished, and those 50,000 visas made available to qualified immigrants of all nationalities now waiting in long lines for their chance to legally immigrate, some of whom have been waiting for 20 years or more.