Birthright citizenship—the principle that any person born in the United States is automatically a citizen—has been embedded in the Constitution since the ratification of the 14th Amendment in 1868. This summer, it has suddenly emerged as a major issue in the Republican presidential campaign. Following the lead of Donald Trump, candidates like Rick Santorum, Bobby Jindal, Ted Cruz, and Rand Paul have called for the repeal or reinterpretation of the amendment, to prevent children born to undocumented immigrants from being recognized as American citizens.

The situation abounds in ironies. Now a Republican target, the 14th Amendment was for many decades considered a crowning achievement of what once called itself the party of Lincoln. Today, moreover, birthright citizenship stands as an example of the much-abused idea of American exceptionalism, which Republicans have berated President Obama for supposedly not embracing. Many things claimed as uniquely American—a devotion to individual freedom, for example, or social opportunity—exist in other countries. But birthright citizenship does make the United States (along with Canada) unique in the developed world. No European nation recognizes the principle. Yet, oddly, those most insistent on proclaiming their belief in American exceptionalism seem keenest on abolishing it.

Why is birthright citizenship part of our Constitution? Until after the Civil War, there existed no commonly agreed-upon definition of American citizenship or the rights that it entailed. The original Constitution mentioned citizens but did not delineate who they were. The individual states determined the boundaries and rights of citizenship.

The Constitution does, however, empower Congress to create a system of naturalization, and a law of 1790 offered the first legislative definition of American nationality. Although the new nation proclaimed itself, in the words of Thomas Paine, an “asylum for mankind,” that law restricted the process of becoming a citizen from abroad to any “free white person.” Thus, at the outset, ideas of American citizenship were closely linked to race.

Slaves, of course, were not part of the body politic. But in 1860, there were half a million free blacks in the United States, nearly all of them born in this country. For decades, their citizenship had been hotly contested. Finally, in the Dred Scott decision of 1857, the Supreme Court declared that no black person could be a citizen. The framers of the Constitution, Chief Justice Roger Taney insisted, regarded blacks, free and slave, as “beings of an inferior order, and altogether unfit to associate with the white race…and so far inferior, that they had no rights which the white man was bound to respect.” (This statement, the Radical Republican leader Thaddeus Stevens later remarked, “damned [Taney] to everlasting fame; and, I fear, to everlasting fire.”)

The destruction of slavery in the Civil War, coupled with the service of 200,000 black men in the Union Army and Navy, put the question of black citizenship on the national agenda. The era of Reconstruction produced the first formal delineation of American citizenship, a vast expansion of citizens’ rights, and a repudiation of the idea that these rights attached to persons in their capacity as members of certain ethnic or racial groups, rather than as part of an undifferentiated American people. Birthright citizenship is one expression of the commitment to equality and the expansion of national consciousness that marked Reconstruction.

In June 1866, Congress approved and sent to the states the 14th Amendment, whose opening section declares that “all persons born or naturalized in the United States, and subject to the jurisdiction thereof, are citizens of the United States and of the state wherein they reside.” What persons are not subject to national jurisdiction? The debates in Congress in 1866 make clear that the language was meant to exclude Native Americans, still considered members of their tribal sovereignties. Two minuscule other groups were mentioned: children born in the United States to the wives of foreign diplomats, and those fathered by members of occupying armies (fortunately, the latter case hasn’t arisen since the amendment’s ratification).

While the immediate purpose of this part of the 14th Amendment was to invalidate the Dred Scott decision, the language says nothing about race—it was meant to establish a principle applicable to all. Opponents raised the specter of Chinese citizenship, or citizenship for “gypsies”; one senator said that he’d heard more about gypsies during the debate than in his entire previous life. Lyman Trumbull, chairman of the Senate Judiciary Committee, made it crystal clear that “all persons” meant what it said: Children born to Chinese, gypsies, or anybody else one could think of would be citizens.

What about the children of “illegal aliens” today? No such group existed in 1866; at the time, just about anyone who wished to enter the United States was free to do so. Only later did the law single out certain groups for exclusion: prostitutes, polygamists, lunatics, anarchists, and, starting in 1882, the entire population of China. In fact, the closest analogy to today’s debate concerns children born to the 50,000 or so Chinese in the United States in 1866, all of whose parents were ineligible for citizenship. The authors of the amendment, and subsequent decisions by the Supreme Court, made it clear that these children must be considered American citizens. The legal status of the parents does not determine the rights of the child; anyone born here can be a good American. These are the principles the Republicans now seek to overturn.

The 14th Amendment, as Republican editor George Curtis wrote, was part of a process that changed the US government from one “for white men” to one “for mankind.” Birthright citizenship is one legacy of the titanic struggle of the Reconstruction era to create a genuine democracy grounded in the principle of equality. It remains an eloquent statement of what our country is or would like to be. We should think long and hard before abandoning it.