Of the 15 million people around the world who entered their names in the U.S. green card lottery this year, Tarik Ansari was one of the lucky minority, fewer than 1 percent, who made it to the final stage.
The 24-year-old French computer engineer was in his San Francisco apartment May 1 when the State Department announced the results of its annual giveaway of 50,000 diversity visas, awarded to people from countries with relatively low levels of immigration to the United States. The notice informed Ansari that he was randomly selected to apply for one of the coveted slots. He could barely contain his excitement.
"Someone pinch me so I know it's not a dream?" he wrote on his Twitter account moments later.
The pinch -- more like a punch -- came almost two weeks later when the U.S. government told Ansari and about 22,000 others that it made a mistake. A computer glitch warped the selection process into something less random than required, apparently favoring those who applied on certain dates. The State Department voided the lottery results and promised a redraw in the summer.
Thousands were devastated by the turnaround. As the State Department prepares to announce the results of its redraw Friday, some of those angered by the bungled lottery have sued to demand that the government reconsider its original results. A hearing on their class-action case began Tuesday in a federal court in Washington, D.C. After an hours-long hearing, Judge Amy


Jackson asked for more technical information from the State Department and continued the case to Wednesday. Ansari, though not a plaintiff, took a red-eye flight to witness the hearing. Dublin resident Anton Kuraev, 28, is one of the 36 plaintiffs suing over the botched lottery. The Russian software engineer moved to the Bay Area on a temporary work visa four years ago, but getting permanent residency -- a green card -- has been difficult, he said. This year was his third applying for the diversity visa.
The chances of being randomly selected for the diversity visa are slim, so Kuraev was overjoyed to find out that he was picked to apply. The notice did not guarantee a visa, but it did mean he beat millions of other entrants to reach the final stage. He spent hundreds of dollars to file the necessary paperwork.
Unlike most of the lottery entrants, applicants such as Kuraev and Ansari already live in the U.S., but their stay here is temporary. They may have to return home if they cannot obtain green cards.
"I will be OK with any (court) decision," Kuraev said in an email. "If there was really a problem with that software and it violated the law and there were no other ways to fix it -- except voiding the selection -- so be it. What I don't understand, however, is why nobody is disciplined for all that mess."
Some lawmakers are pointing to the lottery glitch as a reason to abolish the program entirely, arguing that it does not make sense to give people green cards purely on the luck of the draw.
"You don't even have to have a compelling reason. You just want to come," said Rep. Elton Gallegly, R-Simi Valley, who chairs the immigration subcommittee in the House of Representatives. "You put your names in a hat, and the names come."
Gallegly this week is marking up a Virginia Republican's bill that would eliminate diversity visas.
The diversity visa lottery is one of the few methods for people without existing connections in the United States to settle here. The visa is for those from countries that have not already sent more than 50,000 immigrants to the U.S. in the last five years. That leaves most European and African countries eligible, but it disqualifies anyone from Mexico, China, India, the Philippines and 15 other nations.
The top countries for diversity visa applicants include Nigeria, Bangladesh, Ukraine and Uzbekistan. Receiving so many green card applicants from those countries is not a priority for Gallegly, who said the U.S. already welcomes far too many immigrants annually.
"This lottery thing is -- they're saying it's for the purpose of ethnic diversity," he said. "But clearly we are one of the most diverse countries on the face of the earth."
Gallegly said the lottery is also ripe for abuse by terrorists and foreign spies. He pointed to a 2002 fatal shooting at Los Angeles International Airport committed by an Egyptian man who was able to migrate to the U.S. because his wife won a diversity visa several years earlier.