2021 Upper Hunter state by-election

The 2021 Upper Hunter by-election was held on 22 May 2021 to elect the next Member of Parliament for the district of Upper Hunter in the Legislative Assembly. The by-election was triggered following the resignation of incumbent Nationals MP Michael Johnsen on 31 March 2021.

At around 8:30 pm on the by-election night, ABC News psephologist Antony Green called the election for the Nationals candidate Dave Layzell. Although Layzell was considered the narrow favourite based on polling, he ultimately won by a margin of 5.8% in the two-candidate-preferred vote, larger than polling suggested.

Background
On 24 March 2021, Labor MP for Blue Mountains Trish Doyle used parliamentary privilege to accuse an unnamed government MP of raping a sex worker. Later that day Michael Johnsen, the MP for Upper Hunter, issued a statement that confirmed he was the man accused of the rape, but maintained his innocence. Johnsen announced he would resign from his parliamentary secretary position and leave the government party room to sit as an independent. One week later it was revealed that Johnsen had exchanged lewd messages and explicit videos with the alleged victim while in Parliament, including a string of messages where he was in Question time. After Nationals leader John Barilaro called for him to step down, Johnsen resigned from Parliament on 31 March 2021, maintaining his innocence, but citing "the harassment of some sections of the media" as the reason for his resignation.

Controversies
On 15 April 2021, the campaign of Nationals candidate Dave Layzell was found to have registered websites in the names of two other candidates and then released material about those candidates on those domains. Website domains were registered in the names of Shooters, Fishers and Farmers candidate Sue Gilroy and Labor candidate Jeff Drayton. These sites were used to disseminate material unfavourable to these candidates. The Nationals website registered in Gilroy's name highlighted the risk that a vote for the Shooters was a vote for Labor given the potential for the party to allocate preferences to Labor. At the 2019 state election, the Shooters, Fishers and Farmers party urged Upper Hunter voters to put Nationals last, essentially preferencing Labor over Nationals. Deputy Labor leader Yasmin Catley labelled the Nationals campaign a "dirty tricks" campaign, while Gilroy labelled the tactics a "low blow" and "laughable". Layzell denied personal responsibility for registering the websites and the material distributed on those domains.

On 9 May, former Liberal Party Prime Minister Malcolm Turnbull, who owns property in the electorate, endorsed independent candidate Kirsty O'Connell, saying that she would not "sell-out the health of the community in the way the National party has done, in the way they've cuddled up to the big mining companies with no regard to what the people need here." In response, Nationals leader, John Barilaro said that Turnbull is "an absolute disgrace" and should quit the Liberal Party.