In our vague, self-congratulatory historical memory, the United States became the nation it is today by selflessly throwing open its arms to the world's huddled masses yearning to breathe free and clutching them warmly to the bosom of democracy.

Well, not exactly.

If what happened later is any indication, the first Paleoliths to cross the land bridge from Siberia immediately began worrying about the group coming behind them. A national ambivalence about immigration has been with us ever since.

The Puritans, of course, couldn't tolerate Catholics. The Jamestown settlers feared the Spanish and the Dutch. The Germans, by almost all accounts, were model settlers, but in 1751 no less an American forefather than Benjamin Franklin was demanding to know why they should "be suffered to swarm into our Settlements, and by herding together, establish their Language and Manners, to the Exclusion of ours? Why should Pennsylvania, founded by the English, become a Colony of Aliens, who will shortly be so numerous as to Germanize us instead of our Anglifying them?"

Though French allies and Polish officers helped win the American Revolution, in 1794 President George Washington told Congress that "with respect to immigration ... except for useful mechanics and some particular ... professions, there is no need of encouragement."

That enduring ambivalence toward those who would join us in this land is what's really enshrined amid the newly renovated tile-and-turret Beaux-Arts beauty of Ellis Island. Though this nation since 1607 has accepted two-thirds of the world's immigrants -- more than 60 million people -- we have also refused to shelter millions of others, many of them the very sort of political and religious refugees America is supposed to be all about. At Ellis Island we are forced to wrestle once again with those enduring questions: "What is an American?" and "Who should become one?"

If the Statue of Liberty symbolizes the American dream, Ellis Island is far more complex a metaphor. The government once hanged pirates there. Their bones were left to rot in the gibbet as a warning to sailors on passing ships.

When the flood of immigrants in the 1880s overwhelmed the Castle Garden receiving station adjacent to Battery Park, officials decided to build a whole new receiving station. They chose as its site the onetime hanging ground, augmented by construction rubble from the New York subway system. They wanted an island, so immigrants could be quarantined if necessary and safeguarded from the pickpockets and confidence men ashore who waited at the docks to fleece the naive and unwary. They wanted a place where doctors could weed out those who might end up a charge on the public treasury. They wanted a place where single women immigrants could be held until called for by their fiances or their families, lest they end up prey to prostitution and "white slavers." But all these were essentially considerations of public economics. Ellis Island was basically a processing station for the human energy that would fuel the farms and factories of a growing nation. It was not built as a place of refuge or welcome. It was built primarily for efficiency.

The record shows it was more a gate than an open door. Though relatively few of those who landed there were refused entry, it loomed to the new arrivals as something of a dread portal, impressing them more with authority and obligation than with the freedom and opportunity they had heard so much about. Inspectors watched them as they climbed the stairs for signs of disease and infirmity. "Eye men" grabbed their eyelids with buttonhooks and turned them up to look for signs of infection. There were tests for feeblemindedness and questions about political radicalism, and everywhere an air of purpose. And the immigrants, awestruck by the bustle and majesty of their surroundings, quaked and wondered, "Will I pass the tests? Will I be found worthy of America?"

Beyond the dread portal, there were different apprehensions. Would the nation become "honeycombed with 'foreign' groups living a foreign life"? That cry was raised by labor leader Samuel Gompers, himself an immigrant from England, echoing Franklin's cry more than a century and a half earlier. And there were other fears: cultural and racial dilution, anarchism, alien political intrigues. In 1798 they prompted passage of the Alien and Sedition Acts, permitting the arrest or deportation of any alien in a national emergency. In the 1830s and after they helped give birth to the Know-Nothing movement, a secret society built around hostility to the influx of Irish Catholics. The Know-Nothings even saw a plot in the gift of a stone from the Vatican for the Washington Monument. Samuel F.B. Morse, inventor of the telegraph, claimed Jesuit priests were plotting to overthrow the U.S. government. But the Irish came anyway, and dug the nation's canals.

Nativist movements and sentiments flared with each surge of immigration. When the California gold rush of 1849 brought a flood of Chinese to the West Coast, they were met with mob violence and occasional lynching. In the courts they were considered lower than the Negro or Indian; they could be murdered without reprisal, and whole systems of laws were written to prevent them from acquiring any permanent property. But the Chinese came anyway, and built the transcontinental railroad. America, they remained convinced, was "the Golden Mountain."

When they began agitating for higher wages, Congress in 1882 banned most Chinese immigration as part of the nation's first comprehensive immigration act. West Coast farmers, in search of cheap and tractable laborers, then turned to the Japanese. But the Japanese proved too industrious -- they saved their money, bought land and became highly productive competitors. So Congress in 1907 reached a "Gentleman's Agreement" with Japan restricting entry of the Japanese.

Most early immigrants, of course, had come by sailing ship, on lengthy and uncertain voyages amid conditions frequently so appalling that the death rate among the passengers equaled that aboard slave ships. But by the 1890s, the size and speed of steamships had both shortened the trip and lowered its cost, and the true flood of immigrants began. Between 1890 and 1920 the United States absorbed 18.2 million new arrivals, most of them from southern and eastern Europe. By 1910, 14.5 percent of all U.S. residents were foreign-born. While factory owners rejoiced at the cheap labor and new farms bloomed on the prairies of the Midwest, the nativist elements flourished again.

The nation, they said, was being overrun with inferior races. They pressured Congress to approve a literacy test aimed directly at Italians, Jews and Eastern Europeans, many of whom could not read or write. President Grover Cleveland, however, refused to sign the bill. The same complaints against the new arrivals, he noted, had been made "within recent memory ... of immigrants who, with their descendants, are now numbered among our best citizens."

This was the time of the great migration, when 40 percent of all living Americans had an ancestor among the 12 million who passed through Ellis Island. Most of those continued on by rail to some other destination in the new land, taking with them their hopes and usually triggering fears of some sort wherever they arrived.

By 1921, America's experience with World War I had brought disillusionment with Europe and a growing isolationism. The Ku Klux Klan, originally founded to intimidate blacks but disbanded in the wake of violence, found new life -- and its greatest power -- in the growing hostility to immigrants in general and Catholics in particular. Pushed by those resentments, Congress passed the first of a series of laws seeking to freeze the existing ethnic and cultural makeup of the nation through a series of quotas that effectively choked off the flow of Mediterranean and Slavic peoples with their strange religions and languages and banned virtually all Asian immigration. With few major changes, they would remain in place until 1965.

Considering the debate over Hispanic immigrants today, it's curious that immigration from the Western Hemisphere remained entirely unrestricted by all these laws. The demand for cheap Mexican farm labor in California and Texas encouraged a continuing tide of temporary workers back and forth across the border. Immigration from elsewhere in Latin America was negligible.

Just when and how we began rethinking our protectionist immigration policy is hard to say. The national conscience was shocked after World War II, when it became appallingly clear what had happened to most of those Jews who had tried to leave Nazi Germany for the United States and had been turned away. The extraordinary national unity of the U.S. war effort, furthermore, had underscored the interdependence of Americans of all backgrounds. There was new pride in the miracle of the Melting Pot and the strength it had created. In addition, the Cold War reawakened our concern for political refugees, and we cracked the Golden Door a bit for those fleeing communism.

But perhaps the most visible sign was the election in 1960 of an Irish immigrant's grandson as president of the United States. It is easy -- and much more comfortable -- to forget the virulence of the anti-Catholic elements in the 1960 elections, which raised the prospect of papist plots in a bellow worthy of the Know-Nothings. John F. Kennedy's election largely dispelled those fears. And Kennedy himself wasted few opportunities to remind Americans how far we had come from our anti-immigrant fears, and how far we still could go with the politics of hope.

In 1958 he had published a slender little book called "A Nation of Immigrants," telling anew the stories of trepidation and triumph, of adversities met and overcome and of the lasting, shining vision of the American dream.

"The opportunities that America offered made the dream real, at least for a good many," Kennedy wrote, "but the dream itself was in large part the product of millions of plain people beginning a new life in the conviction that life could indeed be better, and each new wave of immigration rekindled the dream... .

"The continuous immigration of the 19th and early 20th Centuries was thus central to the whole American faith. It gave every old American a standard by which to judge how far he had come, and every new American a realization of how far he might go. It reminded every American, old and new, that change is the essence of life and that American society is a process, not a conclusion. ... More than that, it infused the nation with a commitment to far horizons and new frontiers, and thereby kept the pioneer spirit of American life, the spirit of equality and of hope, always alive and strong."

Kennedy urged a move away from the national-origin quotas, particularly in order to reunite families -- a process greatly enhanced by immigration law changes in 1965 and since.

But the essential question he raises in "A Nation of Immigrants" strikes to the heart of what America is: Do we embrace the politics of hope or the politics of fear? It is the most basic and troubling of human questions, for what is our immigration debate other than that most primal human struggle between the instincts of socialization and those of territoriality?

When John Kennedy wrote his book, Ellis Island had been closed for four years and would, over the next generation, fall gradually into ruin. But the parade of the tall ships into New York harbor on July 4, 1976, reawakened Americans to our immigrant past, and the rededication of the Statue of Liberty 10 years later focused our attention there again. Now, amid the greatest influx of immigrants since the beginning of the century, the new museum at Ellis Island will continue to remind us of where we came from as a nation, and stand as a monument to the dilemma we will always have with us.