Tens of thousands of would-be immigrants may be unable to move legally to the United States after the State Department said Friday that a computer glitch is forcing them to scrap the results of an annual worldwide lottery for U.S. visas.

More than 14 million applicants entered a lottery last fall for one of 50,000 visas distributed as part of the annual Diversity Visa Lottery, designed for people who would otherwise have little chance of legally entering the country. The program doesn’t require applicants to have a family or employer as a sponsor.

Each year the State Department selects about 90,000 applicants and trims the list to 50,000 through an extensive series of interviews, background checks and medical exams.

The lottery has been conducted by computer since its inception in 1994, according to State Department officials.

David Donahue, deputy assistant secretary of state for visa services, said the glitch discovered earlier this month prompted the computer program to unfairly select people who submitted applications in the first two days of the 30-day application process that ended Nov. 3.

“These results are not valid because they did not represent a fair, random selection of the entrants as required by U.S. law,” Donahue said in a video statement posted on the State Department Web site. (Watch it above or here.)

“We sincerely regret any inconvenience or disappointment this might have caused,” he said.

Officials discovered the problem May 5 around the time that entrants were checking their status. An in-house software coding error has been fixed, according to officials who were not authorized to speak on the record.

The State Department will hold a new lottery with the existing pool of applicants and announce the winners by July 15, Donahue said. Applicants do not need to re-enter to be eligible, and no new applications will be accepted.

Winners of the erroneous lottery who aren’t selected again will be able to reapply next fall or in subsequent years, officials said.

Congress established the lottery program to attract immigrants from countries with lower rates of immigration to the United States. Residents of countries with larger rates of U.S. immigration — including China, El Salvador, Haiti, India and Mexico — are not eligible for the program.

Share your thoughts in the comments section below.