In November, 60 per cent of voters in the 9th Assembly District of Long Island, New York voted for Donald Trump. Now, they have elected their first Democratic assembly member, Christine Pellegrino.

In the 9th Assembly District, mere miles from Mr Trump’s birthplace in Queens, New York, Republicans hold a 13-point registration advantage over Democrats. But Ms Pellegrino – who served as a delegate for Bernie Sanders at the Democratic National Convention – pulled off a striking upset this week, beating her Republican challenger 58 to 42 per cent.

“We worked hard. I don’t know what happened,” her competitor, conservative Tom Gargiulo, said.

The 9th Assembly District is small, with a population only slightly over 120,000, and Ms Pellegrino - elected on Wednesday - will be just one of 150 different representatives in the New York State assembly. But the win is just one of several small victories Democrats have amassed in the months since Mr Trump took office.

In neighbouring Carroll County, New Hampshire, for example, Democrat Edith DesMarais recently beat Republican Matthew Plache in a state special election. Mr Trump won the district by seven points in November.

In April, voters in Normal Township, Illinois elected a Democrat to their board for the first time in 100 years. And in the nearby city of Kankakee, an African American Democrat is serving as mayor for the first time ever.

“Republicans should absolutely be concerned,” William F. B. O’Reilly, a Republican consultant, told The New York Times after Ms Pellegrino’s win.

Trump Inauguration protests around the World Show all 14 1 /14 Trump Inauguration protests around the World Trump Inauguration protests around the World Activists from Greenpeace display a message reading "Mr President, walls divide. Build Bridges!" along the Berlin wall in Berlin on January 20, 2017 to coincide with the inauguration of Donald Trump as the 45th president of the United State Getty Trump Inauguration protests around the World An activist holds up a sign at the "We Stand United" rally on the eve of US President-elect Donald Trump's inauguration outside Trump International Hotel and Tower in New York on January 19, 2017 in New York Getty Trump Inauguration protests around the World Protesters burn a U.S. flag and a mock flag with pictures of U.S. President-elect Donald Trump outside the U.S. embassy in metro Manila, Philippines Getty Trump Inauguration protests around the World Filipino protestors hold placcards during a protest rally in front of the US embassy in Manila, Philippines, 20 January 2017. On the eve of President-elect Donald Trump's inaguration as the 45th president of the United States, Filipinos and Fil-Americans held a protest in front of the US embassy in Manila to denounce the incoming US president. Getty Trump Inauguration protests around the World Hong Kong police officers and security guards look on as an anarchist protester belonging to the Disrupt J20 movement sits after using a heavy duty D-lock and motorcycle lock to chain himself to a railing at the entrance gate to the Consulate General of the United States of America in Hong Kong to protest the inauguration of United States President-elect Donald Trump, Hong Kong, China, 20 January 2017. Two activists were arrested and taken away by Hong Kong police during the demonstration. Getty Trump Inauguration protests around the World A banner is unfurled on London's Tower Bridge, organised by Bridges Not Walls - a partnership between grassroots activists and campaigners working on a range of issues, formed in the wake of Donald Trump's election, which aims to build bridges to a world free from hatred and oppression. Getty Trump Inauguration protests around the World Protesters chain themselves to an entry point prior at the inauguration of U.S. President-elect Donald Trump in Washington, DC, U.S. Getty Trump Inauguration protests around the World Bridges Not Walls banner dropped from Molenbeek bridge in Brussels, Belgium, 20 January 2017, in an Greenpeace action part of protests Wolrd protest in solidarity with people in the US, the day Donald Trump sworn in as the 45th President of the United States. Getty Trump Inauguration protests around the World A woman holds an anti-U.S. President-elect Donald Trump placard during a rally in Tokyo, Japan, Getty Trump Inauguration protests around the World A Palestinian protester holds a placard during a demonstration against the construction of Jewish settlements in the occupied West Bank and against US President-elect Donald Trump, on January 20, 2017, near the settlement of Maale Adumim, east of Jerusalem Getty Trump Inauguration protests around the World Banners on North Bridge in Edinburgh as part of the Bridges Not Walls protest against US President Donald Trump on the day of his inauguration Getty Trump Inauguration protests around the World Russian artist Vasily Slonov (L) and his assistant carry a life-sized cutout, which is an artwork created by Slonov and titled "Siberian Inauguration", before its presentation on the occasion of the inauguration of U.S. President-elect Donald Trump, in a street in Krasnoyarsk, Russia Getty Trump Inauguration protests around the World A woman holds a banner during a march to thank outgoing President Barack Obama and reject US President-elect Donald Trump before his inauguration at a park in Tokyo, Japan, 20 January 2017. EPA Trump Inauguration protests around the World Palestinian demonstrators protesting this week against a promise by Donald Trump to re-locate the US embassy to Jerusalem Reuters

These Democratic wins could be a reaction to a historically unpopular Republican president. Liberals have been energised by Mr Trump’s victory – as evidence by the protests after his election and marches during his inauguration – and are more likely to show up for low-turnout special elections.

Even after less-contentious presidential elections, in fact, the newly elected president's party usually loses seats in local and midterm elections.

But these wins are also likely a result of burgeoning Democratic fundraising efforts. Democrat John Ossoff, for example, famously raised more than $8m in his Georgia special election fight.

Ms Pellegrino benefited from this fundraising surge herself, raking in almost $350,000 from teachers’ groups during the campaign. The schoolteacher from West Islip, New York also drew support from the Democratic Party and Working Families Party.

In fact, Ms Pellegrino wasn’t even slated to be the Democratic candidate in the special election, until the Working Families Party stepped in to support her.

By the end of the campaign. Ms Pellegrino had hundreds of volunteers ringing doorbells for her around the district.