The US state department has apologised to thousands of would-be immigrants who were mistakenly informed they were on their way to obtaining a US visa.
Owing to a computer glitch the results of a green card visa lottery on 1 May have been ruled invalid, it said in a statement.
Over 22,000 people were told their names had been chosen.
The applicants will now have to take their chance again with nearly 15 million other hopefuls.
The state department statement said: "We sincerely regret any inconvenience or disappointment this problem might have caused."
A computer error meant that 90% of the winners had been selected from the first two days of applications rather than from the whole 30-day registration period.
The winners of the next visa lottery will be announced in mid-July.
The so-called Diversity Visa Lottery is an annual draw set up by Congress in 1994.
Its aim is to increase the number of immigrants from the developing world and from countries with traditionally low rates of immigration to the US.
Applicants do not have to have the usual family or employer sponsor to qualify.