( CNN ) -- The State Department apologized for a computer glitch that invalidated results for thousands who thought they were chosen in the most recent green card visa lottery . Millions of people worldwide apply for the 50,000 permanent resident visas issued a year to relocate to the U.S. A computer randomly picks would-be immigrants who then undergo interviews , background checks and medical exams before visas can be issued . `` Due to a computer programming problem , the results of the 2012 diversity lottery that were previously posted on this website have been voided , '' the State Department said in a statement Friday . `` We regret any inconvenience this might have caused . '' The results of lottery were not valid , and the drawing will be redone . `` They did not represent a fair random selection of the entrants , which is required by U.S. law , '' said David Donahue , a deputy assistant for the State Department . The issue has been resolved and officials expect to do another selection in July , Donahue said .
Millions apply for 50,000 permanent visas issued a year . `` We regret any inconvenience this might have caused , '' State Department says . Results from a new lottery will be announced in July .