How borders are drawn and enforced has far-reaching consequences, whether we live on either side of them or halfway across the world.

In the span of about a month between early October and early November, about 14 million people around the world will have applied for a “diversity immigrant visa” to the US. Only 0.3% of them will be successful.

Those might seem thin odds for a visa, but they’re decent for a lottery, which is exactly what the US diversity immigrant visa application is. Since 1994, the United States Citizenship and Immigration Services (USCIS) has put on an annual lottery with the ultimate American dream as the prize: each year 50,000 green cards, or permanent residency permits, go to winners selected at random (sort of—there’s a quota system organized by area of origin) by a computer and then processed by the Kentucky Consular Center in Williamsburg, Kentucky.

It’s called the Diversity Immigrant Visa (DV) program, and it’s been helping keep the proverbial melting pot alive for two decades and change.

The only other country in the world with a similar program is New Zealand

While hundreds of thousands of immigrant visas and green cards are given every year on the basis of family connection, or of professional skills, there are only two requirements to participate (pdf) in the DV program, other than the willingness to drop everything and move to the US: to have a high school diploma (or comparable work experience), and to be a citizen of a country that has sent less than 50,000 immigrants to the US in the previous five years. That includes most countries; outliers include Canada, Mexico India, Nigeria, the UK, and mainland China.

The only other country in the world with a similar program is New Zealand, which allots 1,750 diversity visas a year through a lottery system. Relative to New Zealand’s population (about 4.5 million), the program is sizable, but it doesn’t have the broad reach as the US—New Zealand visas are limited to residents of neighbor islands Tonga, Fiji, Kiribati, and Tuvalu.

That one could, for almost no money (the application is free and the green card fee is currently just $330) and with next to no requirements, end up getting a green card through a lottery seems hard to believe—and the proliferation of internet scams trying to profit from it by charging users for applying don’t help dissuade that notion. Yet since the DV program’s inception, over a million people (this writer included) and their immediate families (a visa is automatically also given to lottery winners’ spouses and minor children), have moved to America through it.

A small, big program

In the large system of American immigration, 50,000 immigrant visas isn’t a whole lot. In 2015, for instance, about 550,000 people migrated permanently to the US—in large majority thanks to direct family ties with immigrants already living in the US, and in much smaller measure through professional skills, or as “special immigrants” (including, for instance, Iraqis and Afghans employed by the US government as translators or during military operations in their respective countries).

Those numbers also don’t include temporary, or “nonimmigrant,” visas (pdf, p.1), which include short-term tourist visas, as well as those issued for temporary work and research. In 2015, the US government issued nearly 11 million temporary visas.

Supporters believe the DV program, despite its relatively small size is essential in keeping the US a truly multicultural society by providing an opportunity for people from communities that aren’t largely represented in recent immigration flows to have a shot at America.

Others say the negative consequences of the program outweigh any value it might add. “The number of people who want to come to the US is far larger than we can cope with,” says David North, a fellow at the Center for Immigration Studies, a well-known conservative think tank. The US, he says, is already taking in too many immigrants, particularly those without professional skills. In his opinion, cutting the DV program “would be a good way to cut back on the number of low-skilled immigrants.”

The program is an excellent candidate to be killed under near-future immigration reforms

The program is an excellent candidate to be killed under near-future immigration reforms: it’s small enough not to make much of a difference so legislators won’t get hammered for xenophobia, and yet big enough that lawmakers can point to it as a tangible achievement to appease reformists. The latest attempt at a bipartisan immigration reform, Senate bill 744 proposed by Democratic New York Senator Chuck Schumer in 2013, would do away with the DV program.

The bill has generated significant opposition among those who fear it would close the immigration door to many around the world—particularly potential immigrants in African countries. Yvette D. Clarke, a congresswoman from New York and first chair of the Congressional Black Caucus, has been one of the most vocal supporters of keeping the DV program alive. “It’s not a large program, but it’s significant in its impact for Africans,” says Clarke. Indeed, the relative majority of diversity visa recipients are African, followed closely by Europeans.

Clarke says she values the DV program specifically for its diversity, and would not advocate changing to a system that would, for instance, specifically favor African immigrants. “The US is a nation built by immigrants for immigrants, we have to be a reflection of the world,” she says.

The Irish connection

While the lottery may look now like an idealistic tool to preserve diversity, that’s not necessarily how it was conceived. Quite the contrary, according to Anna Law, a professor of constitutional studies at the City University of New York who wrote The Diversity Visa Lottery—A Cycle of Unintended Consequences in United States Immigration Policy (paywall). According to Law, it was merely a way to get more western Europeans through the door.

The story starts (more or less) with the Immigration and Nationality Act of 1965, a massive overhaul in the US immigration system at the time, which was widely considered discriminatory because it placed quotas on immigrants from certain countries and not others. After the 1965 reforms, the law opened up immigration to all countries equally (with a yearly maximum of 20,000 permanent immigrants per country in the eastern hemisphere, a cap eventually extended to all countries), which ended up dramatically shifting the demographics of American immigrants.

The law gave priority to applicants who were immediate family (children and spouses first, then siblings, parents) of current US citizens. Though there were fewer immigrants from Asia and Latin America already in the US, they were of more recent immigration, and thus were more likely to have immediate family to bring into the country. The same wasn’t true of Europeans, and so in the decades that followed the reform, Asian and Hispanic immigration rose, while the number of white immigrants shrunk dramatically.

Some of the older European immigrant communities once favored by the quota system were no longer largely represented in the new immigrant cohorts. Over time, opponents of the post-1965 reforms began to call for change again, claiming these communities had been “adversely affected” by the immigration reform.

The Irish in particular felt the reform had damaged their communities. Before the 1965 regulation, Law explains in her paper, there was a low-skilled Irish community in the US that had grown relatively large thanks to the country-based quota system. After the reform, unlike other Europeans, the Irish faced a tense political climate in their country, and were particularly motivated to migrate.

In the 1970s, Irish immigrants resorted to coming to the US as tourists and overstaying their visas.

In the 1970s and 1980s, potential Irish immigrants struggled to get sponsorship to move to the US. Even those that applied for asylum from the unrest in Ireland at the time were mostly rejected. Because of that, most Irish immigrants resorted to coming to the US as tourists—in 1973, there were as many as 20,000 Irish tourists, a number so high that it prompted a Congressional hearing—and overstaying their visas. It was their trouble that the lottery was initially designed to fix.

The lottery was introduced as part of the Immigration Act of 1990, but was modeled after two smaller programs that ran in 1987 and 1989, giving out 50,000 and 20,000 visas respectively. The first of those two lotteries, labeled an “experiment in non-sponsored immigration,” was devised by Brian J. Donnelly, a Democratic congressman from Massachusetts—not as a means to diversify the US, but as a tool to legalize members of his constituency: the large illegal Irish community living in Boston.

Technically, the 1987 program counted 36 countries deemed “adversely affected” by the immigration system at the time. So anyone from those 36 countries could put in their lot. But in practice, the experiment overwhelmingly favored the Irish, who were mobilized to submit their applications early, and won 40% of the available visas, because they were awarded on a first-come, first-served basis.

In 1989, a new lottery was set up, this time selecting winners at random among applicants from 162 countries, all considered as “adversely affected” by the immigration system and underrepresented in the US. There was little promotion for the program, though, and it ended up favoring groups that already had strong political support and community organization: Italians, Poles, and the Irish.

“The people who [advocated] for the lottery had no interest in diversity,” says Law. That was pure marketing, she says: the lottery “provided cover for a policy that seemed to address race and linguistic fears about Asian and Hispanic predominance.”

The history of US immigration is often one of unwanted consequences”

And it is true that Mexico, for example, always goes over the cap and so is not included in the DV program, and countries like India and Bangladesh also tend not to qualify because the typically send so many immigrants to the US outside the lottery system.

But “the history of United States immigration is often one of unwanted consequences,” says William Stock, president of the American Immigration Lawyers Association. Despite the intention of its promoters, and the skepticism of its opponents, the DV lottery has in fact become a tool of diversity by becoming a key way into the US for African immigrants, otherwise underrepresented in the country. “That is one of the central ironies of the story,” says Law.

Africa rising

The timing of the lottery—which became official for the 1995 fiscal year—coincided with another great immigration reform that would have a profound impact on the world’s mobility: the so-called Schengen Area came into effect on Mar. 26, 1995, allowing citizens of 15 European states (now 26) to travel and live in the member countries without visa requirements. The opening of European borders made it less desirable for Europeans to move to the US.

At the same time, explains Temple University historian Carly Goodman, in many African countries, neoliberal policies negatively affected development, and citizens left behind by deregulated growth “sought increasingly to escape” but were at a loss as to how. European countries which, as a consequence of Europe’s colonial history, traditionally had relatively African communities and had been the preferred choice for immigrants, started to regulate immigration more strictly, and even temporary visas became harder to get.

“As avenues to Europe started to close off, Africans had fewer opportunities to exit,” says Goodman. And though US visas were hard to get, too, the diversity visa lottery provided a new immigration avenue.

The program’s popularity in African countries, writes Goodman, was and is so high that it fueled a whole industry of services helping with the application, from internet cafés setup specifically for those wishing to enter the lottery to a growing field of passport photo providers and travel agents. Further, Goodman says, the lottery “inspired feelings of goodwill in people” in African countries; many, she reports, considered moving to the US as a chance to make a better life for themselves as well as send remittances home, and spread the belief that the US had started the lottery specifically to help people living on the continent.

Africans make up one of the fastest growing groups of immigrants to the US, and the lottery has been fundamental to the creation and the growth of African-American communities. In 2015, for instance, over 37% of new African immigrants had diversity visas.

The proportion is similar for Europeans (in fact, over 42% of European immigrants had diversity visa in 2015), yet the historical and social importance of these numbers couldn’t be different. “A significant number of Africans was brought to the US through forced slavery,” says Clarke. But before the lottery hardly any “had the opportunity of their choosing to come to the US.”

A country of winners

Even if you don’t believe in the multicultural value of the DV program, there is one more argument for keeping it.

One of the conditions of the visa is relocating to the US permanently within six months of receiving it—in other words, drop everything and move to America. That stipulation, many believe, in part determines the quality of character of the immigrant communities who come to the US through the DV program.

Overall, 28% of US businesses are owned by immigrants.

“There seems to be something valuable to someone who has the courage to come to a country and start from scratch,” says Law. Clarke, too, thinks the lottery rules help limit applications to a special group of “people around the world who have a burning desire to start a life for themselves and their families in the US”—people who are ready to start from scratch, and may have an especially pronounced entrepreneurial gene.

“Just look at the rate of entrepreneurship amongst immigrants,” agrees Stock: 30% foreign-born American resident start their own businesses, compared to a US average of 13%—overall, 28% of US businesses are owned by immigrants. When you don’t necessarily have job prospects or family connections, but are still willing to give it a shot, that means something.

“These people are different from those who are not willing to move away,” says Stock, “and that’s always been part of America’s secret sauce.”