An ecstatic Prime Minister Malcolm Turnbull has thanked the people of Bennelong for returning Liberal candidate John Alexander to Canberra and securing his government's majority in parliament.
The former tennis champion declared his win over Labor's star candidate Kristina Keneally a "renaissance" of Mr Turnbull's leadership before an adoring sea of blue on Saturday night.
Mr Alexander, who likened the thrill of winning to being selected to represent Australia in tennis, said he believed the bitter by-election, marred by stunts and dirty tricks, had brought his party together.
"This is a renaissance of your leadership," a proud John Alexander said to Mr Turnbull.
The prime minister thanked the jubilant crowd for returning Mr Alexander to Canberra shortly after Ms Keneally had conceded defeat at a Labor function less than a kilometre away.
"Thank you Bennelong, thank you Bennelong, for putting faith in this man," Mr Turnbull told the crowd.
"John Alexander had everything thrown at him, every lie that Labor could throw at him."
Earlier in the evening the crowd let out jeers as vision of the Labor function was flashed on screen following a bitter campaign.
Liberal Senator Concetta Fierravanti-Wells said while she had braced for a swing against the government, she believed the voters of Bennelong had seen through the dirty campaign.
"Labor ran their true campaign, a scare campaign, but I think not withstanding the people of Bennelong have seen through that," Senator Fierravanti-Wells told AAP.
The senator believes some of that swing went towards her former colleague Cory Bernardi and his Australian Conservatives.
Liberal supporter Peter Qian said many of the local Chinese community may have looked past perceived tensions between Australia and Beijing and voted on community matters.
"There is a difference between what the Chinese newspapers report and what the people actually think," Mr Qian told AAP.
"Most of them don't view the anti-foreign interference laws as necessarily targeting them."
The pumped up crowd sang goodbye to Ms Keneally as she conceded defeat before beginning to cheer "JA all the way, JA all the way".
The mood turned aggressive as Labor leader Bill Shorten appeared on screen, with the crowd chanting "you are next, you are next".
While Liberal supporters inside the party function enjoyed Mr Alexander's victory speech, a joke he made about disabled parking permits drew criticism online.
Speaking about an injury he had sustained during his tennis career, Mr Alexander quipped he wouldn't be desperate enough to apply for a permit.
"The doctor at the time said 'you have eligibility for a disabled sticker'. I said 'I still have some pride' - that's before I entered politics," Mr Alexander said to laughs from the crowd.
Twitter reacted angrily to the joke.
"John Alexander told a sport anecdote where he described qualifying for a disabled sticker as something to be ashamed of...clumsy, worst victory speech I've ever heard," Gina Dow tweeted.