A banner hangs at Alexandria Ocasio-Cortez’s victory party in the Bronx on Tuesday. (Scott Heins/Getty Images)
Bridey Heing is a freelance writer based in Washington, D.C.

When Alexandria Ocasio-Cortez’s primary victory was announced late Tuesday night, much of the political left celebrated with glee. The former bartender not only beat incumbent Joseph Crowley in the race for New York’s 14th Congressional District seat by a 15-point margin; she also ran as a socialist and spoke of the Democratic Party as a “big tent” with room for the far left.

But by Wednesday afternoon, some of the air had been let out of the balloon. House Minority Leader Nancy Pelosi (D-Calif.) brushed off the suggestion that Ocasio-Cortez’s win means much of anything, saying that a win in one district “is not to be viewed as something that stands for everything else.” Her dismissiveness highlighted the continued tension between socialists and Democrats, a relationship that has long been defined by feigned distance and symbiosis.

While Republicans have relied on socialism as a boogeyman over which to feign horror, Democrats have grappled with a desire to be seen as far from socialists on policy — while adopting causes and initiatives for which socialists have called. It’s a dynamic that has kept socialists at the margins of American politics, even as their policies have become mainstream.

The history of socialism in the United States is fraught and chaotic, its popularity shifting with the economic and political landscape. Proto-socialists in the early 1800s called for the abolition of slavery and established short-lived Utopian communities. With the influx of German immigrants in the mid-1800s came Marxism, the founding of communist and socialist parties, and alliances with the labor rights movement. Despite infighting and schisms over unionism and political action, socialism was on a limited ascent as the 19th century came to an end.

In 1901, Eugene Debs co-founded the Socialist Party of America. Although never a party of more than 100,000 members, the Socialist Party was able to elect numerous candidates to local office in states from coast to coast, and Debs received more than 900,000 votes during his presidential runs in 1912 and 1920. Despite their electoral wins, socialists remained on the fringes of power.

The parties, however, did not just allow socialists to linger on the fringes. The first Red Scare, in 1919 and 1920, was less effective than Sen. Joseph McCarthy’s, but it had a similar goal. In response to labor uprisings, the Russian Revolution and bombings by anarchist groups, Attorney General A. Mitchell Palmer began a campaign of propaganda and targeted raids against groups on the far left. Although the campaign ended in 1920, it set socialism up as an enemy of the state in ways that have lingered. Socialism was associated with Russian Bolshevism and characterized as a dangerous foreign force that stood against democracy. Democrats and Republicans took up the anti-socialist cause in equal measure; when the New York State Assembly moved to expel five socialist members, only one Democrat opposed the action.

But the passage of New Deal legislation revolutionized the relationship between the state and the citizen, introducing the broad notion that the government has a responsibility to ensure the welfare of its people. In a 1934 article for the Atlantic, Harold Laski noted that President Franklin D. Roosevelt’s policies were aimed at ensuring capitalism was “the servant, and not the master, of the American people” by ensuring some level of social welfare for the public. While not crimson, this was certainly a shade redder than American policy in the past.

Under Roosevelt, the modern dynamic between the mainstream parties and socialism was crystallized: The Democrats would borrow from socialist policy proposals while disavowing the ideology in attempts to weather rhetorical attacks from Republicans. When he was slammed as a socialist by Republican politicians, Roosevelt defended himself by denying the association, rather than defending the merits of socialist ideas. When President Harry S. Truman was accused of being a socialist, he responded by diminishing “socialist” to a throwaway pejorative, saying in 1950, “Confronted by the great record of this country, and the tremendous promise of its future, all they can croak is ‘Socialism!’ ”

Socialism became truly toxic in the mid-20th century, building on the decades that came before. McCarthy’s decade-long harassment of those he accused of being socialists or communists began in 1947. For the rest of the century, “socialist” was one of the dirtiest words in politics, helped along by Cold Warriors such as President Ronald Reagan. The rise of the counterculture in the 1960s and 1970s didn’t provide a foothold for socialists like the upheaval of the late 1800s and early 1900s had; Bernie Sanders is the only socialist activist to emerge from that period with influence.

While antagonism between the Republican Party and socialists remained fervent throughout the 20th century, the relationship was more complex between socialists and Democrats, even though shades of red can be seen in party policies aimed at combating housing discrimination, making college more affordable and increasing access to health care. Even as Democrats borrow from socialists, be it on building the social safety net in the 1960s or calling for the abolition of Immigration and Customs Enforcement today, they insist on differentiating themselves.

President Lyndon B. Johnson was dismissive of accusations that he was promoting socialism, telling Barry Goldwater in 1960, “I think all of us have to decide for ourselves what represents a ‘socialist’ platform.” His landmark Great Society legislative program and War on Poverty included civil rights legislation and Medicare, which  Reagan warned would bring about socialism in the United States. President Jimmy Carter, while further to the right than many in his own party at the time, introduced a failed proposal to provide basic health care for all Americans. The Clintons’ efforts to pass health-care legislation in the post-Reagan 1990s were met with cries of socialism from the right, to which President Bill Clinton responded much as Roosevelt had, defending his initiatives by highlighting the place of private insurance while denying any association with socialist ideas. In 1998, he went further, equating socialism with totalitarianism, saying that the 20th century saw “the victory of democracy over totalitarianism, of free enterprise over state socialism,” in a speech honoring Roosevelt’s legacy, including the New Deal.

Under President Barack Obama, the right’s heavy use of socialism to decry government policies such as the Affordable Care Act became a running joke on the left. Still, Obama encouraged those who accused him of being socialist to “meet real socialists” and defended his policies by citing his capitalist credentials. Even in 2015, Hillary Clinton was dismissive of socialism, saying during a debate, “We are not Denmark,” a reference to the democratic socialist systems many point to as examples for the United States.

In 2016, commentators frequently remarked that Sanders had pulled Clinton to the left during the campaign. Whether true or not, that sentiment captures the dynamic between the Democrats and socialists for over a century; socialists have long been the leftward flank of the political spectrum, offering ways forward but being kept from power. But this dynamic is increasingly untenable as income inequality continues to rise, the gig economy creates unsustainable working conditions and social-justice issues go unresolved. Consider that Clinton suggested that identifying as a capitalist (while qualifying that she wants accountability) became a liability among some potential Democratic voters during the campaign.

The question now is whether this flurry of interest in socialism will be sustained and whether Democrats, who have long been harried by red fright and responsible for enabling it, will make space for socialism. While the Republicans continue to decry socialism as a threat to the fabric of our society, the Democrats have a chance to capitalize on the momentum of young, up-and-coming leaders such as Ocasio-Cortez and welcome socialists into the fold for the first time.