Malcolm Turnbull's parliamentary majority hinges on the seat of Bennelong, where a heated and sometimes dirty by-election campaign has canvassed everything from Chinese-Australian relations to domain name registrations.
Sparked by the resignation of sitting Liberal member John Alexander over dual citizenship concerns, the government now finds itself threatened by Labor and its star candidate Kristina Keneally.
Alexander, a former Australian tennis player, won the seat with a margin of almost 10 per cent at the 2016 federal election but recent polls suggest his buffer has all but evaporated.
A Newspoll published at the beginning of the week suggested Keneally, a former NSW premier, was even with Alexander on a two-party preferred basis.
A more recent Fairfax Media-ReachTEL poll indicates the Liberals are just ahead.
Labor last claimed Bennelong in 2007 when then prime minister John Howard was defeated by Maxine McKew, who held the seat for just one term.
Keneally has campaigned on healthcare and education in the northwest Sydney seat but she's been dogged by her record in state government and links to jailed Labor kingmakers Eddie Obeid and Ian Macdonald as well as Joe Tripodi, who's been labelled corrupt by the corruption watchdog.
Alexander hasn't escaped controversy either, with an old video of him making sexist and racist jokes emerging early in the campaign, leading to a public apology.
Both candidates have accused each other of dirty tricks with the attacks becoming more personal in the final days of the race.
The prime minister on Wednesday admitted the Liberal Party had bought the domain kristinakeneally.com to post criticisms about her record.
The website stunt prompted opposition leader Bill Shorten to accuse Turnbull of being "obsessed" with the Labor candidate.
Meanwhile, Labor has been accused of doctoring and distributing a video of Alexander talking about cuts to education.
The respective campaigns did focus on some local issues but it was the government's attacks on Senator Sam Dastyari's questionable dealings with Chinese political donors that reverberated to Beijing and back to Bennelong.
Dastyari was forced to resign after coming under sustained attack from the government, which accused him of allowing cash to influence Labor's foreign policy.
But the PM's line of attack drew criticism from Beijing and prompted Keneally and Shorten to accuse the Liberal Party of running a "China-phobic" campaign, even though the opposition leader sacked Dastyari from leadership roles and accused him of poor judgement.
More than 20 per cent of Bennelong voters have Chinese ancestry.
Sydney University lecturer Dr Stewart Jackson says the attacks on Dastyari may have turned off some Chinese members of the Bennelong electorate.
"It actually doesn't play out too well with a lot of Chinese people because it feels like an attack on China," Jackson told AAP, adding a big turnout at the polls would help Keneally.
"A good turnout will actually favour Labor because it will be bringing out people that were unsure about voting, young voters, who are traditionally more left wing or progressive."
Jackson says the odds are stacked against Labor but Keneally does have a chance of pushing the coalition into minority government.
"I don't think they've got a great chance - but I think they do have a real chance," he said.