Alexandria Ocasio-Cortez, the winner of a Democratic Congressional primary in New York. Photos / AP
Last year, before she ended the 20-year congressional career of Joe Crowley and upset her city's most powerful political machine, Alexandria Ocasio-Cortez was working behind a bar.
She had helped launch Flats Fix, a tacos and craft cocktail spot in Manhattan, while pondering what to do next.
"I was taking brunch orders, with the AC off, and people from progressive political groups were calling me," she said last week in an interview.
She'd organised for Senator Bernie Sanders in New York, but he lost the presidential primary.
She'd rallied at Standing Rock, the site of Native American protests against a natural gas pipeline that would cut through their North Dakota land.
She'd worked with Bronx Progressives and the Democratic Socialists of America to lobby Crowley's office; she was cheered when the congressman endorsed the House's "Medicare for All" legislation.
In May, encouraged by the activists she'd been working with, the 28-year-old Ocasio-Cortez filed to challenge Crowley.
It was a long shot, but it was at least a way to build a political movement. "If [the district] can be more educated, more organised, more invested than we were a year ago," she told WYNC in November 2017, "then this campaign will have been 100 per cent worth it."
Ocasio-Cortez now looks to be on her way to Congress, running in a district that gave 78 per cent of its vote to Hillary Clinton and that Republicans aren't seriously contesting.
There, she could be the youngest woman elected by either political party.
Before this year, Crowley had never come close to losing in New York's 14th Congressional District. Republican reaction to Ocasio-Cortez's win was mostly about Crowley's defeat and how his party's establishment had lost to a self-described socialist.
That was what Ocasio-Cortez had set out to do - replace the party establishment, and the Queens Democratic Party machine controlled by Crowley, with a new establishment and a new electorate.
Justice Democrats and Brand New Congress, among the progressive groups that had urged her to run, ended up staffing her campaign.
She wasn't inclined to back House Democratic Leader Nancy Pelosi for speaker, name-checking one of the House's most left-wing members as a better choice.
"I'd like to see new leadership, but I don't even know what our options are," she said. "I mean, is Barbara Lee running? Call me when she does!"
One year ago, @Ocasio2018 was working at a craft cocktail bar in Manhattan -- their website still has an image of her mixing drinks. From the bar, to destroying the Queens Democratic machine, in one year. pic.twitter.com/XvmDYxAXG4
Ocasio-Cortez's politics are substantially to the left of most of the party, and even Sanders.
In her campaign videos and posters, designed by friends from New York's socialist circles, she came out for the abolition of ICE, universal Medicare, a federal jobs guarantee and free college tuition.
The ads also made it clear that she was a different candidate - a young Latina from the Bronx, not a white man from Queens.
The posters, which she said were designed to look "revolutionary," were bilingual and centered her face; her viral campaign video, created by a socialist team called Means of Production, began with her saying that "women like me aren't supposed to run for office," over an image of her getting ready for the day in a busy apartment building.
"The only time we create any kind of substantive change is when we reach out to a disaffected electorate and inspire and motivate them to vote," Ocasio-Cortez told the left-wing magazine In These Times, in one of many interviews she gave as her campaign seemed to surge in the final weeks.
"That is how Obama won and got re-elected, and that's how Bernie Sanders did so well."
In interviews last week, as Ocasio-Cortez canvassed voters in Queens, she said her campaign began with grassroots organisers and took off once national left-wing media noticed what she was doing.
An early profile in the Intercept, she said, was "a game-changer," leading to more interviews and profiles that led with the audacity of her challenge, then got to her policies.
This is the moment a 28-year-old socialist Democrat in New York realises she has scored a massive upset.
Alexandria Ocasio-Cortez beat a powerful party veteran in a congressional primary election.pic.twitter.com/nSp9jyfjKn
By the final week of the campaign, when she briefly left the state to see conditions at immigrant detention centres in Texas, she was updating Vogue on how the campaign was going.
"The biggest hurdle that our communities have is cynicism - saying it's a done deal, who cares, there's no point to voting," Ocasio-Cortez told volunteers before one of their canvasses.
"If we can get somebody to care, it's a huge victory for the movement and the causes we're trying to advance."
Why challenge Crowley?
She would explain: He was a "corporate Democrat," who received more money from corporate PACs than from local donors - and from the developers who were driving up housing costs.
He had voted to create the Department of Homeland Security.
He'd voted for the war in Iraq. He'd voted for PROMESA, the bill that created a hated bankruptcy board to handle Puerto Rico's debt.
"My grandfather died in the storm," Ocasio-Cortez tweeted last month.
"Your acts shut schools and starved public services when we needed them most."
None of that had stopped Crowley in the past, but Ocasio-Cortez was convinced that it could - if she met the voters who were angry about it.
My hot take on NY-14: It's a D+29 district, and the 27th most Democratic district in the country. It can support one of the most liberal members of Congress in the nation.
Her campaign began with phone banks that targeted thousands of unaffiliated voters, informing them that they needed to register as Democrats six months before the election if they wanted to vote in the primary.
It purchased the Democratic voter list, but Ocasio-Cortez's team found the built-in technology to be too clumsy, so they built their own app and handed it to volunteers.
The campaign's greatest weapon was Ocasio-Cortez herself, who proved to be a natural candidate with a compelling story.
She was the first to admit that she had bounced around, from Senator Ted Kennedy's office to the National Hispanic Institute to political organising to the service industry. She had to; her family had been hit hard during the 2008 financial crisis.
Crowley did not take the challenge lightly, spending US$1.5 million, more than five times as much as his opponent.
In his own campaign messaging, Crowley called himself "Joe from Queens," and emphasised how his clout in Washington made him an ideal opponent to Donald Trump.
In his one televised debate with Ocasio-Cortez, Crowley briefly went on the offensive, telling viewers that his opponent had once said that New York's gun laws didn't need to be applied in other states.
The attack was true - Ocasio-Cortez had said it in a Reddit forum - but she laughed it off, called it "trolling on the Internet," and he moved on.
In the end, a candidate who fit the district in a lot of different respects ran a really good campaign that excited a lot of people in a very low turnout race. Wouldn’t say it was obvious that she would win, but in retrospect is it that complicated?
One of her greatest coups came a week before the primary, when a Bronx newspaper held a candidate forum and Crowley could not attend. Ocasio-Cortez showed up early, shaking hands even though the crowd was thin.
Crowley had sent Annabel Palma, a former city councillor, to take his place, even though she occasionally confessed not to know Crowley's positions on issues in front of Congress.
She was heckled after saying, correctly, that Crowley supported moving America's embassy in Israel from Tel Aviv to Jerusalem.
The day that embassy was moved, Ocasio-Cortez condemned the "massacre" of Palestinians who had protested against it, and tweeted that "Democrats can't be silent about this anymore."
The first-time candidate was clearly getting the best of the longtime city councillor. Ocasio-Cortez's focus stayed on Crowley. Early in the debate, before she was told not to stand during answers, she paced the stage and said that her campaign was of, by, and for the Bronx.
"We have touched the hearts and minds of all families here. We are fighting for an unapologetic movement for economic, social, and racial justice in the United States," said Ocasio-Cortez.
She turned and faced Palma. "With all due respect," she said, "I'm the only one running for Congress in this room."
Alexandria Ocasio-Cortez, 28, challenged Joe Crowley on ideological and racial grounds, arguing that the 10-term congressman was not in step with his majority-minority district and was too cozy with corporate donorshttps://t.co/K0wwYn6frN